Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aforge
Copy link
Contributor

@aforge aforge commented Jul 7, 2023

  1. Session.addSub & Session.delSub should be happening (atomically) together modifications of Topic.sessions.
  2. Only one of Session.subscribe() and Session.leave() is allowed to be inflight at any given moment.

Attempt at addressing #866

1. Session.addSub & Session.delSub should be happening (atomically) together modifications of Topic.sessions.
2. Only one of Session.subscribe() and Session.leave() is allowed to be inflight at any given moment.
@or-else
Copy link
Contributor

or-else commented Jul 7, 2023

It looks like the wg sync.WaitGroup is now redundant. The sem portion duplicates its functionality. Or am I missing something?

@or-else
Copy link
Contributor

or-else commented Jul 7, 2023

It looks like the wg sync.WaitGroup is now redundant. The sem portion duplicates its functionality. Or am I missing something?

Actually no, wg is still needed.

Instead of writing to Session.detach.
@aforge aforge merged commit f89ca30 into devel Jul 7, 2023
@aforge aforge deleted the session-sub-race-dev branch July 7, 2023 16:06
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