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

Add AsyncSemaphore data structure #5

Closed
1 task done
Supereg opened this issue Feb 20, 2024 · 2 comments
Closed
1 task done

Add AsyncSemaphore data structure #5

Supereg opened this issue Feb 20, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Supereg
Copy link
Member

Supereg commented Feb 20, 2024

Problem

In some cases, it is very useful to ensure exclusive access in an asynchronous context (e.g., ensure that an async method within an actor is only entered by a single called at a time).
SpeziBluetooth introduced a AsyncSemaphore data structure within the latest release, see here.

Solution

This data structure would be great to reuse across the Spezi framework ecosystem (e.g., there is currently also a need in StanfordSpezi/SpeziLLM#45).
This would require to move out the data structure from SpeziBluetooth, add documentation and dedicated unit testing for within SpeziFoundation.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@philippzagar
Copy link
Member

AsyncSemaphore has been added to SpeziFoundation in: #7

@PSchmiedmayer
Copy link
Member

Thank you @philippzagar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

3 participants