Are coroutines executed in parallel?
I'm trying this example:
call_em_together() and call_em_coroutine() both print roughly 4 seconds as the result. call_em_parallel() prints roughly 2 seconds. Does that mean coroutines are not executed in parallel? Is there a way to execute them in parallel, like with goroutines in Go?
I saw a TaskGroup mentioned in the changelog but no documentation for it exists yet, and I'm not sure how to import it.
My use case is to have a blocking process/an infinite loop (e.g. a server listener) running on one coroutine , and another processes (e.g. a client making requests) executing in another in parallel
call_em_together() and call_em_coroutine() both print roughly 4 seconds as the result. call_em_parallel() prints roughly 2 seconds. Does that mean coroutines are not executed in parallel? Is there a way to execute them in parallel, like with goroutines in Go?
I saw a TaskGroup mentioned in the changelog but no documentation for it exists yet, and I'm not sure how to import it.
My use case is to have a blocking process/an infinite loop (e.g. a server listener) running on one coroutine , and another processes (e.g. a client making requests) executing in another in parallel
