digitalmars.D.learn - Fibers and std.socket
Is it possible to mix fibers with sockets from phobos? If so, how would I do it? Like just a simple example of async sockets using fibers in D. I will say that I'd prefer to not use any packages ex. vibe.d
May 21 2020
On Friday, 22 May 2020 at 06:10:38 UTC, Atwork wrote:Is it possible to mix fibers with sockets from phobos? If so, how would I do it? Like just a simple example of async sockets using fibers in D. I will say that I'd prefer to not use any packages ex. vibe.dYes you can mix std sockets with fibers, but then you have two options - either sockets are in blocking mode (and every socket can block current thread and other fibers) or you use sockets in non-blocking mode and then you have to manage socket events in some hand-made event loop. AFAIK there is no other options.
May 22 2020