[ASYNC-52] Go block run by multiple threads at the same time for a single chan instance Created: 29/Jan/14 Updated: 20/Apr/14 Resolved: 20/Apr/14
|Reporter:||Gerrit Jansen van Vuuren||Assignee:||Rich Hickey|
I'm using channels instead of agents to provide serial access to resources.
f is a function that in my test case writes to a output stream, sometimes f will close the output stream, and recreate a new one. The output stream is held in a shared atom. If the go block takes one value after another everything should run fine. The thing is I get an output stream closed exception. After several runs it 'seems' to me that the go block is run by different threads at the same time.
If I change the go block to a thread the error goes away.
To reproduce the error:
and run in leiningen
The go block is on line 24.
|Comment by Gerrit Jansen van Vuuren [ 29/Jan/14 5:49 PM ]|
please ignore and close this.