Generic stream interfaces that support a combination of reading, writing, and seeking.
|
| ReaderWriters |
| Streams that support both reading and writing.
|
|
| Readers |
| Streams that support reading but not writing.
|
|
| Writers |
| Streams that support writing but not reading.
|
|
◆ CreateMpscStream()
Creates a multi-producer, single consumer stream.
This method creates a stream by associating a reader and writer. Both are reset before being connected. This is the only way to connect a reader. Additional writers may be connected by copying the given writer after it is connected.
This method is thread-safe with respect to other MpscReader and MpscWriter methods. It is not thread-safe with respect to itself, i.e. callers must not make concurrent calls to CreateMpscStream()
from different threads with the same objects.
- Parameters
-
[out] | reader | The reader to connect. |
[out] | writer | The writer to connect. |