-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added v3.2.0 changelog. Added channels documentation. Updated documentation for ConfigureAwait.
- Loading branch information
1 parent
95db72c
commit f5cb851
Showing
9 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Change Log | ||
|
||
## v3.2.0 - November 3, 2024 | ||
|
||
Enhancements: | ||
|
||
- Added `Channel<T>` and related types in `Proto.Promises.Channels` namespace. | ||
- Added `Promise(<T>).{ConfigureAwait, ConfigureContinuation}` APIs and accompanying `ContinuationOptions` type. | ||
- Added `SynchronizationOption.CapturedContext` option. | ||
- Added `(Ordered, Configured)AsyncEnumerable.ConfigureAwait(ContinuationOptions)` new overloads. | ||
- Exposed `ConfiguredAsyncEnumerable<T>.{ContinuationOptions, CancelationToken}` and `ConfiguredAsyncEnumerable<T>.Enumerator.ContinuationOptions`. | ||
- Added `ManualSynchronizationContextCore` type. | ||
- Added `PromiseSynchronizationContext.Execute(bool exhaustive)` API. | ||
- Added `Promise(<T>).FromException` API. | ||
- Added option to disable context capture for async synchronization primitives. | ||
|
||
Fixes: | ||
|
||
- Fixed some bugs surrounding `AsyncEnumerable.Merge` enumerator disposal. | ||
- Fixed a potential race condition with `Promise.New` API. | ||
- Fixed some async Linq implementations that weren't configuring the awaits properly. | ||
|
||
Deprecated: | ||
|
||
- Deprecated `Promise(<T>).WaitAsync` APIs accepting `SynchronizationContext` and `SynchronizationOption`. | ||
|
||
Misc: | ||
|
||
- Changed default `Progress` invokeOption to `CapturedContext`. | ||
- Added net8.0 build target. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Channels | ||
|
||
A channel is an async producer/consumer data structure, similar to a blocking collection. You can use it to move data from 1 or more producers to 1 or more consumers asynchronously. Both bounded and unbounded channels are supported. | ||
|
||
`Proto.Promises.Channels.Channel<T>` was designed very similar to `System.Threading.Channels.Channel<T>`. See the [BCL documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/channels) to see how channels may be typically used. Channels in this library work very similarly, but were also designed to not allocate. When you no longer need the channel, you can `Dispose` it to return the backing object to the pool for future re-use. | ||
|
||
Another difference from the BCL design is, if the channeled objects need to be cleaned up, and you are working with a bounded channel, you can retrieve the dropped item and clean it up, or try to write it to the channel again. `if (channelWriteResult.TryGetDroppedItem(out var droppedItem)) { ... }` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters