* fixes #15076 * heapqueue: optimized for ARC * added another test case [backport:1.4] * code cleanup
This commit is contained in:
parent
3e7077ac7d
commit
da753c6a2e
4 changed files with 105 additions and 8 deletions
21
tests/arc/tasyncleak4.nim
Normal file
21
tests/arc/tasyncleak4.nim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
discard """
|
||||
cmd: "nim c --gc:orc -d:useMalloc $file"
|
||||
output: '''ok'''
|
||||
valgrind: "leaks"
|
||||
"""
|
||||
|
||||
# bug #15076
|
||||
import asyncdispatch
|
||||
|
||||
var futures: seq[Future[void]]
|
||||
|
||||
for i in 1..20:
|
||||
futures.add sleepAsync 1
|
||||
futures.add sleepAsync 1
|
||||
|
||||
futures.all.waitFor()
|
||||
futures.setLen 0
|
||||
|
||||
setGlobalDispatcher nil
|
||||
GC_fullCollect()
|
||||
echo "ok"
|
||||
Loading…
Add table
Add a link
Reference in a new issue