Inheritance of actor isolation for TaskGroup

you may find the discussion in this thread of interest, as i believe it is pretty similar. in particular, Konrad's reply here, which states:

TaskGroup is designed specifically to introduce concurrency and run child tasks in parallel. If we just inferred [isolation] by capture we'd constantly linearize their execution almost by accident one might say.

i'm not entirely sure what the intent of your actual code is, so it's unclear exactly what an appropriate workaround or solution would be. one thing to note though is that if you're going to pass value as a sending parameter, then presumably it should be marked as sending in the function parameter as well (otherwise how can it be known that it's safe to send?). i believe your sample code can be made to compile with various annotations and unsafe opt-outs, but it's perhaps better to first ask what your ultimate goal for the code is.

2 Likes