[ASYNC-64] Race condition when closing mults Created: 29/Apr/14 Updated: 23/Jun/14
When a mult is tapped at around the same time as the source channel is closed, the tapped channel may not be closed.
The above code will sometimes return true, and sometimes return false.
Cause: This is caused by the following code in the mult function:
Any channels tapped after cs is dereferenced will not be closed.
Approach: A possible solution to this could be to always close channels tapped to a closed source. i.e.
This could be achieved by adding a flag to the cs atom to denote whether the mult is open or closed. If it's closed, any tapped channel is closed automatically.
|Comment by James Reeves [ 30/Apr/14 6:05 AM ]|
For reference, below is the custom fix for mult I'm using: