I found an earlier post that noted this: Why Task { } doesn’t need explicit use of self?:
I think detached task initially wasn't required to explicitly mention
self
but was later changed.Questions
- Does detached task have a
self
requirement because of how it interacts with actors (it doesn't inherit the context and could run on a different executor)?- Is there a way to reliably detect data races? TSAN sometimes catches it and sometimes seems to miss data races. (not sure others face this issue or I am missing something)
Does anybody have a source where this was decided (if it was formally decided)?