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

Use a context-global shared VPIO unit #210

Merged
merged 9 commits into from
Mar 18, 2024
Merged

Conversation

Pehrsons
Copy link
Contributor

@Pehrsons Pehrsons commented Mar 8, 2024

The shared VPIO unit gets created on the first creation of a duplex stream. It will be used by any request for a duplex VOICE stream, if allowed and possible given the requested devices. With this PR there cannot be two VPIO units for a given context.

@Pehrsons Pehrsons self-assigned this Mar 8, 2024
@Pehrsons Pehrsons force-pushed the reusable-vpio-serialize branch from 76fe402 to 186056e Compare March 8, 2024 13:49
@Pehrsons Pehrsons force-pushed the reusable-vpio-serialize branch from 186056e to ca1650d Compare March 8, 2024 16:15
Pehrsons added 9 commits March 8, 2024 22:56
It allows at most one vpio duplex stream per context, which is hopefully
enough for all real-world use cases.

Note that Gecko could create at most one duplex stream per document, and
there could in theory be multiple documents per context, which is a
content process singleton.
Creating the vpio unit takes a long time. This commit lets clients
create the shared vpio unit async on a background thread ahead of time,
so that when they need it it is already available for reuse.
For input there could be a an output stream if vpio is present on the
machine.
Copy link
Collaborator

@padenot padenot left a comment

Choose a reason for hiding this comment

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

As discussed on chat.m.o, this could probably be streamlined, it does the job.

@Pehrsons Pehrsons merged commit 436e0cd into serialize Mar 18, 2024
2 of 4 checks passed
@Pehrsons Pehrsons deleted the reusable-vpio-serialize branch March 18, 2024 22:10
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