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

Port life cycle with regards to locking #38

Open
reconbot opened this issue Aug 24, 2016 · 0 comments
Open

Port life cycle with regards to locking #38

reconbot opened this issue Aug 24, 2016 · 0 comments

Comments

@reconbot
Copy link
Contributor

I'm opening this issue to describe locking behavior and locking behavior with regards to the port lifecycle. I'd want to wait until #27 is closed before making a PR.

Ignoring how a port is opened or requested. A closed port should be able to be opened or reopened, and a port object that goes out of scope should be closed (if it's not already) to prevent a resource leak by the browser. A crashed browser will terminate effectively closing the serial port as well.

Open ports should (based upon the discussion in #35) be locked for exclusive use by the browser (Using OS primitives such as flock or no sharing mode in *nix and windows) and for exclusive use by a single port object in all browser contexts.

A closed port would not retain this exclusivity and would error upon reopening if another serial port object were to have opened the same port.

A later version of this spec might allow resource sharing with other processes outside the browser or other objects but that is out of scope of the initial spec.

@reconbot reconbot mentioned this issue Aug 24, 2016
@reconbot reconbot mentioned this issue Sep 5, 2016
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

No branches or pull requests

1 participant