Skip to content

Commit

Permalink
fixes nim-lang#16154; underlying system.add for seq is the real cause…
Browse files Browse the repository at this point in the history
…; will be addressed in a follow-up PR (nim-lang#16161)
  • Loading branch information
Araq authored and ardek66 committed Mar 26, 2021
1 parent db1252a commit 67c4a35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/pure/asyncdispatch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1199,9 +1199,10 @@ else:
not p.selector.isEmpty() or p.timers.len != 0 or p.callbacks.len != 0

proc prependSeq(dest: var seq[Callback]; src: sink seq[Callback]) =
let old = move dest
var old = move dest
dest = src
dest.add old
for i in 0..high(old):
dest.add(move old[i])

proc processBasicCallbacks(
fd: AsyncFD, event: Event
Expand Down

0 comments on commit 67c4a35

Please sign in to comment.