v2.2.0
Enhancements:
- Added
Promise(<T>).AwaitWithProgress(maxProgress)
API to use current progress instead of passing in minProgress. - Added
Promise(<T>).{RaceWithIndex, FirstWithIndex}
APIs to be able to tell which promise won the race. - Added
Promise(<T>).WaitAsync(CancelationToken)
APIs, and added optionalCancelationToken
arguments to existingWaitAsync
APIs. - Added optional
bool forceAsync
arguments to existingWaitAsync
and other APIs that allow changing context.
Fixes:
- Fixed
CancelationToken
callbacks not being invoked after they are registered after the originalSystem.Threading.CancellationTokenSource
has been reset (.Net 6.0+). - Fixed a deadlock in
PromiseSynchronizationContext.Send
if the callback throws an exception. The exception is rethrown in .Net 4.5+. - Fixed
WaitAsync
andProgress
if nullSynchronizationContext
is passed in. - Fixed compile errors in Unity 5.
Optimizations:
- Slightly increased performance and decreased memory (at the cost of no longer unwinding the stack, which users can now do with the
forceAsync
flag).
Misc:
- Completely removed internal stacktraces in .Net 6 or later.
- Added net6.0 build target.