v2.4.0
Enhancements:
- Added
Promise.ParallelFor
andPromise.ParallelForEach
APIs to run iterations concurrently and asynchronously (compare toParallel.ForEach
). - Exposed
CancelationRegistration.DisposeAsync()
in all supported runtimes. - Added
AsyncLock
andAsyncMonitor
to be able to lock around asynchronous resources (in theProto.Promises.Threading
namespace, only available in .Net Standard 2.1 or newer runtimes).
Fixes:
- Promise result values are no longer stored past the promise's lifetime.
- Fixed compilation errors in Unity 2017 when the experimental .Net 4.6 runtime is selected.
- Fixed compilation warnings in Unity when importing the ProtoPromise package through the Package Manager.
- Fixed default foreground context never being executed in Unity 2019.1 or newer.
Optimizations:
- Increased performance of progress reports.
- Increased performance of promises.
- Reduced memory consumption of
All
,Merge
,Race
, andFirst
promises.
Misc:
- Progress reports now use full 32-bit float precision instead of 16-bit fixed precision.
- Changed
Promise.Run
forceAsync
flag to default totrue
instead offalse
.
Breaking Changes:
- Changed
CancelationRegistration.DisposeAsync()
to returnPromise
instead ofValueTask
(await using
code still works the same, but may need a recompile).