Add wxStreamTempInputBuffer::ReadAll() helper.
This just reads everything remaining in the stream in a blocking way and will be used to get the data remaining in the stream buffers after the child process had been already closed (and hence can't write any more to it and there is no risk of deadlock). See #10258. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a25b76f5f9
commit
cda5c26a48
@ -91,6 +91,19 @@ public:
|
||||
return !m_stream || m_stream->Eof();
|
||||
}
|
||||
|
||||
// read everything remaining until the EOF, this should only be called once
|
||||
// the child process terminates and we know that no more data is coming
|
||||
bool ReadAll()
|
||||
{
|
||||
while ( !Eof() )
|
||||
{
|
||||
if ( !Update() )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// dtor puts the data buffered during this object lifetime into the
|
||||
// associated stream
|
||||
~wxStreamTempInputBuffer()
|
||||
|
Loading…
Reference in New Issue
Block a user