Skip to content

fix deadlock when batch canceled, some workUnit's done channel can't be closed - #14

Open
vvnotw wants to merge 1 commit into
go-playground:v3from
vvnotw:v3
Open

fix deadlock when batch canceled, some workUnit's done channel can't be closed#14
vvnotw wants to merge 1 commit into
go-playground:v3from
vvnotw:v3

Conversation

@vvnotw

@vvnotw vvnotw commented Sep 12, 2019

Copy link
Copy Markdown

It happend in this situation:

  1. call Batch.Cancel()
  2. wu.cancelling is set in cancelWithError()
  3. wu.writing is set in Queue()
    now, wu.done is never closed, batch will wait forever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants