Closed janjaapbos closed 2 years ago
To clarify, I am researching how to create a pool of workers with runng, and also looked at ThreadPool of the futures crate.
Actually, I just found out that I can reuse the same ReplyAsyncHandle in a loop, receiving and replying. So that solves my question.
Is it possible to create a long running Aio reusing the same callback, to be used for workers, like in the example for nng-rs? See https://github.com/neachdainn/nng-rs/blob/master/examples/async.rs
My understanding of runng leads me to believe that Aio's are one time use only, and cannot be rescheduled to do another receive. Is that correct, or is there a way?