You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WriteAPIImpl.Flush() appears to have an irrelevant bug, and to be overly complex for what it actually does, which does not include
flushing as implied by the documentation.
Loop until the goroutine animating bufferProc() has acknowledged that bufferInfoCh has length zero. This is probably an error, and the length of bufferCh is intended to be checked.
Loop until the goroutine animating writeProc() has acknowledged that writeCh has length zero.
A fundamental problem is that bufferCh, bufferInfoCh, and writeCh are all unbuffered channels: their length will never be anything but zero. So the only effect of waitForFlushing() is transient synchronizations with the bufferProc() and writeProc() goroutines. pabigot@b9b12c8 provides a simplified equivalent.
Since cleaning this up doesn't address the core problem of #289 I haven't submitted a PR, but I can do so if you wish.
The text was updated successfully, but these errors were encountered:
WriteAPIImpl.Flush()
appears to have an irrelevant bug, and to be overly complex for what it actually does, which does not includeflushing as implied by the documentation.
waitForFlushing() has two steps:
bufferProc()
has acknowledged thatbufferInfoCh
has length zero. This is probably an error, and the length ofbufferCh
is intended to be checked.writeProc()
has acknowledged thatwriteCh
has length zero.A fundamental problem is that
bufferCh
,bufferInfoCh
, andwriteCh
are all unbuffered channels: their length will never be anything but zero. So the only effect ofwaitForFlushing()
is transient synchronizations with thebufferProc()
andwriteProc()
goroutines. pabigot@b9b12c8 provides a simplified equivalent.Since cleaning this up doesn't address the core problem of #289 I haven't submitted a PR, but I can do so if you wish.
The text was updated successfully, but these errors were encountered: