streamly icon indicating copy to clipboard operation
streamly copied to clipboard

Change wSerial operation to interleave fairly

Open harendra-kumar opened this issue 4 years ago • 1 comments

Currently wSerial interleaves in an asymmetric manner if more than 2 streams are interleaved by chaining the operation more than once. We can implement wSerial in the same way as wAsync except that it would interleave all streams in the same thread instead of running them asynchronously. It would require a queue of streams and they will be scheduled in a round robin fashion. It will also resolve #513 as this operation will now become associative.

harendra-kumar avatar Mar 18 '21 20:03 harendra-kumar

We can perhaps support this using Channels. We can create a Channel for fair interleaving, it need not be concurrent.

harendra-kumar avatar Jan 18 '24 07:01 harendra-kumar