Skip to content

v2.4.0

Compare
Choose a tag to compare
@timcassell timcassell released this 23 Dec 11:29
· 906 commits to master since this release

Enhancements:

  • Added Promise.ParallelFor and Promise.ParallelForEach APIs to run iterations concurrently and asynchronously (compare to Parallel.ForEach).
  • Exposed CancelationRegistration.DisposeAsync() in all supported runtimes.
  • Added AsyncLock and AsyncMonitor to be able to lock around asynchronous resources (in the Proto.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, and First promises.

Misc:

  • Progress reports now use full 32-bit float precision instead of 16-bit fixed precision.
  • Changed Promise.Run forceAsync flag to default to true instead of false.

Breaking Changes:

  • Changed CancelationRegistration.DisposeAsync() to return Promise instead of ValueTask (await using code still works the same, but may need a recompile).