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

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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Nov 10, 2016

Member

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

Member

s-ludwig commented Nov 10, 2016

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