Skip to content

Commit

Permalink
Updated version and docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
timcassell committed Jan 27, 2025
1 parent 9061d53 commit 49afe6a
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 8 deletions.
46 changes: 46 additions & 0 deletions Docs/Changelog/v3.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Change Log

## v3.3.0 - January 27, 2025

Enhancements:

- Added `Proto.Timers`.
- `Timer` and `TimerFactory`
- Added `Promise.Delay` APIs.
- Added `Promise(<T>).WaitAsync` APIs with timeouts.
- Added delayed cancelation APIs to `CancelationSource`.
- `CancelationSource.New(TimeSpan, (optional) TimerFactory, (optional) linked token(s))`
- `CancelationSource.CancelAfter(TimeSpan)`
- Added `CancelationToken(bool)` constructor.
- Added `CancelationToken.RegisterWithoutImmediateInvoke` APIs.
- Added `PromiseYielder.Initialize()` API to help with early code running before Unity can auto initialize.

Fixes:

- Fixed Unity initialization not being fully initialized before user `Awake` methods run.

Optimizations:

- `Promise(<T>).ConfigureAwait(ContinuationOptions)` consumes zero memory if `Promise.Config.AsyncFlowExecutionContextEnabled` is disabled (which is the default state).
- Reduced memory of `async Promise(<T>)`.
- Reduced memory of async synchronization primitives
- Reduced memory of `Promise.ParallelFor*` APIs.
- Reduced memory of `Channel`s.
- Optimized object pool contention.
- Internally avoid cost of zeroing types that contain no references.
- Split `Promise(<T>).ContinueWith` methods without a `CancelationToken` parameter to avoid the cost of the token when it's not needed.
- Reduced memory and increased speed of `AsyncLazy<T>` when the factory is invoked.
- No longer pool memory allocated from `AsyncLazy<T>`.

Deprecated:

- `Promise(<T>).{Then, Catch, CatchCancelation}` APIs accepting a `CancelationToken` parameter. (Prefer `WaitAsync` followed by the same API without the token.)
- Deprecated `CancelationSource.{IsValid, TryCancel, TryDispose}`. (Prefer `!= default` and methods without `Try` prefix.)
- Deprecated `CancelationToken.{TryRegister, TryRegisterWithoutImmediateInvoke}`. (Prefer `CanBeCanceled` and methods without `Try` prefix.)
- Deprecated `Promise(<T>).Deferred.{IsValid*, Try*}` APIs. (Prefer `!= default`.)
- Deprecated `Promise(<T>).IsValid`.

Misc:

- Changed behavior of `CancelationSource.Cancel` to not throw if it's called more than once.
- Changed behavior of `CancelationSource`, `Promise(<T>).Deferred`, `Channel(Reader/Writer)` to throw `NullReferenceException` if it's default.
14 changes: 10 additions & 4 deletions Package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
title="Promises/A+ 1.1 compliant" align="right" />
</a>

![NuGet](https://img.shields.io/nuget/v/ProtoPromise.svg)
[![openupm](https://img.shields.io/npm/v/com.timcassell.protopromise?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.timcassell.protopromise/)

Robust and efficient library for management of asynchronous operations.

- Allocation-free async operations
Expand Down Expand Up @@ -49,11 +52,14 @@ See the [C# Asynchronous Benchmarks Repo](https://github.com/timcassell/CSharpAs

## Latest Updates

### v3.2.0 - November 3, 2024
## v3.3.0 - January 27, 2025

- Added Channels.
- Added `Promise(<T>).{ConfigureAwait, ConfigureContinuation}` APIs.
- Added `SynchronizationOption.CapturedContext` option.
- Added `Proto.Timers` and time-based APIs.
- Added `CancelationToken(bool)` constructor and `CancelationToken.RegisterWithoutImmediateInvoke` APIs.
- Added `PromiseYielder.Initialize()` API to help with early code running before Unity can auto initialize.
- Fixed Unity initialization not being fully initialized before user `Awake` methods run.
- Reduced memory and increased speed.
- Deprecated several APIs.

See [ChangeLog](https://github.com/timcassell/ProtoPromise/tree/master/Docs/Changelog) for the full changelog.

Expand Down
2 changes: 1 addition & 1 deletion Package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.timcassell.protopromise",
"version": "3.2.0",
"version": "3.3.0",
"unity": "2018.3",
"displayName": "ProtoPromise",
"description": "Robust and efficient library for management of asynchronous operations.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<!--We target .Net Standard 2.0 to support old Unity versions, and we also target .Net Standard 2.1 to use function pointers.-->
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<Version>3.2.0</Version>
<Version>3.3.0</Version>
<!--In case any IL2CPP issues need to be resolved like in the core library.-->
<DefineConstants>$(DefineConstants);ENABLE_IL2CPP</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<Version>3.2.0</Version>
<Version>3.3.0</Version>
<!-- The language version Unity supports in 2023.1. -->
<LangVersion>9</LangVersion>
<!--In case any IL2CPP issues need to be resolved like in the core library.-->
Expand Down
2 changes: 1 addition & 1 deletion ProtoPromise/ProtoPromise.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
<Version>3.2.0</Version>
<Version>3.3.0</Version>
<!--Set true to help debug internal promise code (allows the debugger to step into the code and includes internal stacktraces).-->
<DeveloperMode>false</DeveloperMode>
</PropertyGroup>
Expand Down

0 comments on commit 49afe6a

Please sign in to comment.