#More details on `TaskGroup` and async

7 messages · Page 1 of 1 (latest)

quiet belfry
#

Hi @lyric vault @stable flume , are there any details avaialble on the implementation and/or usage of the TaskGroup or on how to use async/schedule tasks to run concurrently in Mojo at the moment? The only example I found is this explanation by Jack #1276206591510843443 message , wondering if y'all can provide more insights?
E.g. is it possible to await tasks one by one and not the whole group at once?

vast trenchBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

quiet belfry
#

The use-case I have in mind is non-blocking networking in Lightbug. Potentially looking at implementing some simple analogue of Mio in Rust https://docs.rs/mio/1.0.2/mio/index.html , to that point also wondering if there is some event polling availiable in Mojo that we don't see in stdlib or if I have to rely on epoll/kqueue?

knotty salmon
#

Think the work going on in async at the moment is going on at the compiler level.

hollow kestrel
#

I’m slowly moving towards this but I need some more stuff in coroutines before I can implement it in a reasonable way.

quiet belfry