aww, that fixes the sig issue

This commit is contained in:
Jaremy Creechley 2023-09-14 15:50:15 -07:00
parent 84f3f8638b
commit 23725cf74a
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 4 additions and 7 deletions

View File

@ -108,16 +108,13 @@ method put*(
# wait for taskpool work to finish
wait(sig).
then(proc () =
# sig.decr()
os.sleep(400)
os.sleep(200)
let val = ret.convert(void)
putRes.complete(val)
).cancelled(proc() =
# sig.decr()
# TODO: could try and prevent taskpool work before it starts?
discard
).catch(proc(e: ref CatchableError) =
# sig.decr()
discard
doAssert false, "will not be triggered"
)
).catch(proc(e: ref CatchableError) =

View File

@ -84,9 +84,9 @@ type
SharedSignal* = SharedPtr[SharedSignalObj]
proc `=destroy`*[T](x: var SharedSignalObj) =
proc `=destroy`*(x: var SharedSignalObj) =
if x.sigptr != nil:
echo "ThreadSignalObj: destroy "
echoed "ThreadSignalObj: destroy "
release(x.sigptr)
x.sigptr = nil