"belltown" wrote:
I don't know exactly what you're asking here. But yes, there is a 3rd state. ...
Yes - you got it what i was asking.
Hmm, i was musing last night when going to sleep - albeit it hasn't crystalized when i woke up, so need more brain power: can we come with some "pattern" if you will, some code/contraption atop Tasks, that can be used to handle "haram" functionality? So that one does not have to write a separate Task for every little method but instead maybe there is only one task^ with magazine of methods under it - and those get invoked function-call like, the behavior handled by a framework. The calls in general being asynchronous^^, either doing callback at the end or passing result message back to a common queue. And each "call" does not have to necessarily spawn a new thread - there could be a pool of waiting threads, or a new call-message may just wait till a worker thread is available. That could all be built using the primitives, the question is the result being more usable/intuitive than the current er, paradigm...
PS. see
viewtopic.php?f=34&t=98722 for continuation
(^) task "factory" of sorts; <task/> is already a factory: tickling its .control forks threads
(^^) I am also musing about synchronous option, like wrapping in `await()` call, which to take care of collecting the async result and only then returning - but unsure if this is not counterproductive, in defeating the purpose of the "haram" list