| 1263 | return emptySlot; |
| 1264 | } |
| 1265 | |
| 1266 | Result AsyncPipeline::checkBuffersPool() |
| 1267 | { |
| 1268 | AsyncBuffersPool& buffers = source->getBuffersPool(); |
| 1269 | |
| 1270 | for (AsyncWritableStream* sink : sinks) |
| 1271 | { |
| 1272 | if (sink == nullptr) |
| 1273 | break; |
| 1274 | if (&sink->getBuffersPool() != &buffers) |
| 1275 | { |
| 1276 | return Result::Error("AsyncPipeline::start - all streams must use the same AsyncBuffersPool"); |
| 1277 | } |
| 1278 | } |
| 1279 | for (AsyncDuplexStream* transform : transforms) |
| 1280 | { |
| 1281 | if (transform == nullptr) |
| 1282 | break; |
| 1283 | if ((&transform->AsyncReadableStream::getBuffersPool() != &buffers) and |
| 1284 | (&transform->AsyncWritableStream::getBuffersPool() != &buffers)) |
| 1285 | { |
| 1286 | return Result::Error("AsyncPipeline::start - all streams must use the same AsyncBuffersPool"); |
| 1287 | } |
| 1288 | } |
| 1289 | return Result(true); |
| 1290 | } |
| 1291 | |
| 1292 | bool AsyncPipeline::listenToEventData(AsyncReadableStream& readable, AsyncDuplexStream& transform, bool listen) |