> Could you explain why not?

Current current gc:refc does not allow refs object to be passed between threads 
willy nilly. Async creates a reactor ref object per thread. So you can't really 
share the async corutines between threads. Threads are just kind of hard to use 
with gc:refc, that is why gc:arc is getting worked on.

> This project is a library for (primarily) mobile apps.

I have limited experience with nim mobile apps. But knowing what I know don't 
think I would use async on the client. Async is great if you are doing tons of 
http style requests. But really a mobile client? Just regular threads are 
probably better if you are just writing and reading from a single websocket 
connection. I would try both methods to see which one fits you better.

I am also a huge fan of UDP, packed based protocol instead of streaming 
http/tcp. You don't even need threads to have a good UDP system. Here is what I 
use [https://github.com/treeform/netty](https://github.com/treeform/netty) if I 
control both ends.

But some times you just have to go with WebSockets, I wrote a library for that 
too: [https://github.com/treeform/ws](https://github.com/treeform/ws) though 
its async based.

Reply via email to