Closed harendra-kumar closed 4 years ago
restore
assumes that suspend saved info for all the work units. But suspend exit
before finishing all the threads. It must not exit when there are alternative thread waiting.
The non-deterministic execution of transient precludes a way to assure that all the possible threads (or executions of the same threads) have passed trough the suspend point, It can not guarantee it. if However we detect that no threads remain active using the threadBlockedInMVarOperation
exception used in collect
that would imply that some computations would never suspend when some thread remain active waiting for some event. This is not desirable. Therefore this may be left as is, with all these caveats.
That is not because threads n
but it makes things more apparent.
Consider this program:
This does not perform full 10 iterations.