Creates a new AsyncGenerator from an async function that takes a yield function.
The yield function is used to produce values asynchronously.
The generator runs in the provided TaskGroup.
If no_wait is true (default), the taskgroup will not wait for the generator to finish
when other tasks are done, implicitly cancel it.
If no_wait is false, the taskgroup will wait for the generator to finish, potentially blocking shutdown.
It is encouraged to set no_wait to true to avoid resource leaks, and spawn the generator
in a dedicated TaskGroup with the consumer.