swift-async-algorithms
swift-async-algorithms copied to clipboard
Test sleeping in both tasks of Task.select.
This makes it so that each task in Task.select sleeps so that we get test coverage on the behavior I saw in #139 where the task would hang forever. The task does not hang forever if one of the selections is a non-awaiting block of code.
We don't need to sleep for any significant amount of time. I chose 100 microseconds, but it could even be a 0 duration sleep.
Hi @phausler, I created this a few days ago in case you are interested. This is the test that would have stalled forever until the clock fixes you made.
@swift-ci please test
Task.select was removed since it caused design patterns to push to sendable iterators. So this is not needed anymore.