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

TaskPipe.waitForData never returns if no new data is written #1605

Closed
mathias-baumann-sociomantic opened this issue Oct 31, 2016 · 1 comment
Labels

Comments

@mathias-baumann-sociomantic

So, I am not sure that is a bug or just badly documented intended behaviour:

When I am calling waitForData(250.msecs) on a task pipe, my expectation is that it will return after either data arrived, the task pipe is closed or 250 msecs passed.

What actually happens is that it only returns when the socked is closed or data arrived.
Inside the function is a while loop that will repeat the waiting for as long as there is no data and the pipe isn't closed. See:

https://github.com/rejectedsoftware/vibe.d/blob/34f1b81242bfa30a5b66faef443500452ca79eac/source/vibe/stream/taskpipe.d#L112-L116

Is that a bug or intended?

@s-ludwig
Copy link
Member

Definitely a bug. I'll look into a fix once I have the vibe-core-compat branch ready.

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

No branches or pull requests

2 participants