Add hasPendingOperations check to asyncdispatch.drain
This commit is contained in:
parent
29db57a804
commit
3073f08e48
1 changed files with 1 additions and 1 deletions
|
|
@ -1487,7 +1487,7 @@ proc drain*(timeout = 500) =
|
|||
## if there are no pending operations. In contrast to ``poll`` this
|
||||
## processes as many events as are available.
|
||||
if runOnce(timeout):
|
||||
while runOnce(0): discard
|
||||
while hasPendingOperations() and runOnce(0): discard
|
||||
|
||||
proc poll*(timeout = 500) =
|
||||
## Waits for completion events and processes them. Raises ``ValueError``
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue