InputStream: add static method OpenReady()
Merge some duplicate code.
This commit is contained in:
@@ -118,6 +118,15 @@ struct InputStream {
|
||||
static InputStream *Open(const char *uri, Mutex &mutex, Cond &cond,
|
||||
Error &error);
|
||||
|
||||
/**
|
||||
* Just like Open(), but waits for the stream to become ready.
|
||||
* It is a wrapper for Open(), WaitReady() and Check().
|
||||
*/
|
||||
gcc_malloc gcc_nonnull_all
|
||||
static InputStream *OpenReady(const char *uri,
|
||||
Mutex &mutex, Cond &cond,
|
||||
Error &error);
|
||||
|
||||
/**
|
||||
* Close the input stream and free resources.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user