mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation: The SAL tests suffered from a rare non-determinism: When we go onto the EventLoop to get a value and then leave it, we previously just assumed that the EventLoop would park itself before we did any futher operations on it. That was mostly true because the tests are doing one thing after the other. There was however a narrow race: If the tests enqueued new work onto the EventLoop before the EventLoop parked itself, then the new work would be run _before_ the EL parks itself. That would make the _next_ operation fail because the operations usually start by checking that we're parked because that's a synchronisation point between tests and EL. Modifications: Actually wait until the EL's parked. That proves we found our synchronisation point. Result: - fixes #1514 - fixes #1545 - fixes #1548 - fixes #1550