Skip to content

New synchronisation proposal#52

Merged
rochala merged 2 commits intomainfrom
new-synchronisation-proposal
Sep 22, 2025
Merged

New synchronisation proposal#52
rochala merged 2 commits intomainfrom
new-synchronisation-proposal

Conversation

@rochala
Copy link
Contributor

@rochala rochala commented Aug 29, 2025

A new task synchronisation proposal

@rochala rochala merged commit 0630b8f into main Sep 22, 2025
1 check passed
@kubukoz kubukoz deleted the new-synchronisation-proposal branch September 23, 2025 10:37

class ComputationQueueImpl(semaphore: Semaphore[IO]) extends ComputationQueue {
def synchronously[A](computation: SynchronizedState ?=> IO[A]): IO[A] = {
semaphore.permit.use(_ => computation(using new SynchronizedState {}))
Copy link
Contributor

Choose a reason for hiding this comment

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

question: shouldn't this be usng the protected given already instantiated?

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.

3 participants