system/FileDescriptor: add method IsReadyForWriting()
This commit is contained in:
@@ -222,4 +222,10 @@ FileDescriptor::WaitWritable(int timeout) const noexcept
|
|||||||
return Poll(POLLOUT, timeout);
|
return Poll(POLLOUT, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
FileDescriptor::IsReadyForWriting() const noexcept
|
||||||
|
{
|
||||||
|
return WaitWritable(0) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -180,6 +180,9 @@ public:
|
|||||||
|
|
||||||
int WaitReadable(int timeout) const noexcept;
|
int WaitReadable(int timeout) const noexcept;
|
||||||
int WaitWritable(int timeout) const noexcept;
|
int WaitWritable(int timeout) const noexcept;
|
||||||
|
|
||||||
|
gcc_pure
|
||||||
|
bool IsReadyForWriting() const noexcept;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user