Files
swift-nio/Sources/NIO
Johannes Weiss 2fec7a9766 fix races in RepeatedTasks and its tests (#555)
Motivation:

There were a number of race conditions in both the RepeatedTasks
implementation and its tests:

- #554: the RepeatedTask could fire more than once before the
  cancellation was actually processed leading to a crash in tests
- #548: a test was testing that the RepeatedTask ran a certain
  number of times but the counting was racing with the checking
- TOCTOU issue: When a RepeatedTask was cancelled it was possible that
  it fires one extra time because a TOCTOU issue

Modifications:

- fixed the test races
- fixed the TOCTOU issue by checking if it was cancelled when it's
  executed rather than only when it's scheduled to be executed

Result:

- tests should be more stable (fixes #548 & fixes #554)
- RepeatedTask cancellation improved
2018-08-07 07:59:18 +01:00
..
2018-03-19 14:43:38 +01:00
2018-08-01 15:57:27 +01:00
2018-08-01 15:57:27 +01:00