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

Fix SharedService clientId locking with multiple services. #107

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

rhashimoto
Copy link
Owner

Each instance of SharedService was acquiring a Web Lock on its clientId. When implementing multiple services (i.e. with different service names) instance after the first one would block.

The ideal fix would probably be to use a Web Lock name unique to each instance's clientId+serviceName combination, and pass that name in the service request. That would allow better generalized instance lifetime management. Since this is just a proof of concept and this issue doesn't affect the demos here (or applications where service consumers don't need to terminate before their Javascript context does), this PR simply ensures that each context only acquires the lock once.

@rhashimoto rhashimoto merged commit 122c46e into master Jul 31, 2023
@rhashimoto rhashimoto deleted the bug-sharedservice-locking branch July 31, 2023 17:16
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