Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to TaskCompletionSource #89

Merged
merged 1 commit into from
May 13, 2024
Merged

Switch to TaskCompletionSource #89

merged 1 commit into from
May 13, 2024

Conversation

RReverser
Copy link
Member

@RReverser RReverser commented May 12, 2024

Description of Changes

There is only one place where we use Channels, and it's to create and await a channel with one element - which is functionally the same as a more precise and low-weight TaskCompletionSource.

Switching also makes the SDK compatible with the widely supported .NET Standard 2.1 subset, which is supported natively in Unity and allows to remove a custom System.Threading.Channels package from Unity SDK dependencies.

API

  • This is an API breaking change to the SDK

If the API is breaking, please state below what will break

Requires SpacetimeDB PRs

List any PRs here that are required for this SDK change to work

@RReverser RReverser requested review from jdetter and kazimuth May 12, 2024 19:37
Base automatically changed from fix-conflict-resolution to master May 13, 2024 15:46
There is only one place where we use Channels, and it's to create and await a channel with one element - which is functionally the same as a more precise and low-weight TaskCompletionSource.

Switching also makes the SDK compatible with the widely supported .NET Standard 2.1 subset, which is supported natively in Unity and allows to remove a custom System.Threading.Channels package from Unity SDK dependencies.
Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - let's remember to delete the custom threading package in the Unity SDK.

@RReverser RReverser merged commit a9053c5 into master May 13, 2024
2 checks passed
@RReverser RReverser deleted the use-tcs branch May 13, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants