Trying not to shoehorn coroutines where they don't...
# coroutines
s
Trying not to shoehorn coroutines where they don't fit well (especially since I'm unfamiliar with them) Do coroutines sound like a good fit for that?
g
This... Its really more about who is doing the job of locating resources to execute your world setup. The problem coroutines were designed to solve is one of thread dispatching; Coroutines allow you to call blocking API's without actually blocking your thread idiomatically. So theres a win on performance --its much easier to use one thread to do lots of things since things are suspending instead of blocking, and theres a win on expressibility --code that normally uses callbacks now looks like a simple serially executing block
Regarding the first point, performance of coroutines, i think this might be important for your server, in a multiplayer setting. Although at that point you probably want to look at some kind of actor system --which might be considered a big-brother scheme to co-routines