fix occasional deadlock

This commit is contained in:
Jaremy Creechley 2023-09-26 19:25:05 -07:00
parent 5c2cc57ccc
commit 4ff162e0c5
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -265,7 +265,8 @@ proc queryTask[DB](
# otherwise manually an set empty ok result
ctx[].res.ok (KeyId.none, DataBuffer(), )
discard ctx[].signal.fireSync()
discard nextSignal.waitSync().get()
if not nextSignal.waitSync(1.seconds).get():
raise newException(DeadThreadDefect, "query task timeout; possible deadlock!")
var handle = handleRes.get()
for item in handle.iter():