On Thu, 9 Jun 2022, Raul Miller wrote:
"task local storage" rather than "thread local storage"
Yes. That's what I meant, but I was not clear enough.
local variables accomplish something similar
Local variables are not meaningfully mutable. IOW they are not really _state_.
how to clean this up
Task constructors and destructors might be a good idea, and do have prior art.
how to debug issues related to it
What do you mean?
shorter duration
If I have my way, tasks and threads will be orthogonal. If a task migrates from one thread to another--and the former dies--it should maintain its local state.
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm