The communication between the working/FFI and client thread happens throughout taskpools/channels_spsc_single. While this works well in general, the client thread might get eventually blocked in the following, if the working thread is busy:
|
let res = ctx.reqReceivedSignal.waitSync(timeout) |
Then, we need to follow @arnetheduck's suggestion and, instead, use this: https://github.com/status-im/nim-async-channels
Note: use the following as an inspiration on how to use it: status-im/nim-json-rpc#254
( cc @NagyZoltanPeter .)
The communication between the working/FFI and client thread happens throughout
taskpools/channels_spsc_single. While this works well in general, the client thread might get eventually blocked in the following, if the working thread is busy:nim-ffi/ffi/ffi_context.nim
Line 73 in 803744d
Then, we need to follow @arnetheduck's suggestion and, instead, use this: https://github.com/status-im/nim-async-channels
Note: use the following as an inspiration on how to use it: status-im/nim-json-rpc#254
( cc @NagyZoltanPeter .)