Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearer explanation of locking streams? #7

Open
rrnewton opened this issue Apr 1, 2013 · 0 comments
Open

Clearer explanation of locking streams? #7

rrnewton opened this issue Apr 1, 2013 · 0 comments

Comments

@rrnewton
Copy link

rrnewton commented Apr 1, 2013

It's not totally clear from the haddocks what the semantics are:

http://hackage.haskell.org/packages/archive/io-streams/1.0.1.0/doc/html/System-IO-Streams.html

The docs seem to say that direct access to the InputStream or OutputStream become threadsafe (peek, read, write), though this could be made more painfully clear. But how does locking multiple points within an arbitrary network of parallel, concurrentMerged streams work out?

By reading the code for concurrentMerge I infer that it always uses a unique thread to access each input, so it shouldn't require locking on its inputs. But maybe the docs could indicate how these things fit together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant