Some thoughts:

  * ARC and ORC use a shared heap, so theoretically you can pass GC’d data 
around via Isolated[T], and not have to worry about architecting everything to 
be thread-local. How well this works in practice is TBD.
  * As @elcritch said, you will need to marry a channel or multithreaded queue 
with an async-compatible event triggering mechanism.
  * It seems like you could use something like 
<https://github.com/jackhftang/threadproxy.nim> to handle messaging between 
threads, and use async pipes to signal that the async callback on a thread 
should wake up and poll the channel.
  * Using one async event per message won’t work, you’ll run out of file 
descriptors. The advantage of using pipes for signaling is that you only need 
one pipe per channel.


Reply via email to