diff options
author | Ruslan Mustakov <r.mustakov@gmail.com> | 2017-12-30 15:41:41 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-12-30 10:27:31 +0100 |
commit | 3073f08e4857b14a6bd1b0022fe45f461bf88171 (patch) | |
tree | b54ff854a6796306af1de83d8cfdcd10905eb277 /lib/pure | |
parent | 29db57a804e03ac4d9d943ac7cf3966777fa5c8d (diff) | |
download | Nim-3073f08e4857b14a6bd1b0022fe45f461bf88171.tar.gz |
Add hasPendingOperations check to asyncdispatch.drain
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/asyncdispatch.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index b62cf2e9b..42ffa236c 100644 --- a/lib/pure/asyncdispatch.nim +++ b/lib/pure/asyncdispatch.nim @@ -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`` |