This is an archive of the discontinued LLVM Phabricator instance.

Add Pipe::WriteWithTimeout method
ClosedPublic

Authored by labath on Jul 20 2015, 9:52 AM.

Details

Summary

This commit adds a WriteWithTimeout method to time Pipe class, analogous to the existing
ReadWithTimeout(). It also changes the meaning of passing zero as a timeout value. Previously,
zero was used as an infinite timeout value. Now, the meaning of zero timeout to return the data
avaiable without sleeping (basically, a non-blocking operation). This makes the behaviour of Pipe
consistent with the Communication/Connection classes. For blocking operatios with infinite
timeout, I introduce a special constant for this purpose.

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 30165.Jul 20 2015, 9:52 AM
labath retitled this revision from to Add Pipe::WriteWithTimeout method.
labath updated this object.
labath added reviewers: ovyalov, zturner.
labath added a subscriber: lldb-commits.
zturner accepted this revision.Jul 20 2015, 9:59 AM
zturner edited edge metadata.

windows stuff lgtm

This revision is now accepted and ready to land.Jul 20 2015, 9:59 AM
ovyalov accepted this revision.Jul 20 2015, 10:47 AM
ovyalov edited edge metadata.

LGTM

This revision was automatically updated to reflect the committed changes.