SignalCoreKit/SignalCoreKitTests
Jordan Rose 755746107a Call a Future's observers outside of the Future's state lock
Avoids a reentrancy deadlock when a promise's 'result' is used from
within an observer callback. This is a behavior change only in the
following scenario:

1. A promise is sealed and starts running its observers
2. While fulfilling observers, a new observer is added (on the same
   thread or from on another thread)

Previously, the future would wait until all existing observers have
been run, then run the new observer. Now, the new observer will run
immediately, since the only thing being checked is that the promise
has been sealed. We could do more work to preserve the old behavior,
but it's better to not depend on such intricacies in the first place.
2022-03-03 16:18:30 -08:00
..
src Call a Future's observers outside of the Future's state lock 2022-03-03 16:18:30 -08:00
SignalCoreKitTests.swift Initial code drop. 2018-09-21 12:47:57 -04:00