Seperate open/close port from subscription?
DanielJoyce opened this issue · 0 comments
DanielJoyce commented
Currently when you open a port opened by someone else, you are really subscribing to said port
When you close a port, the underlying serial port is not closed till all other clients close that port as well. Its more like unsubscription.
Should we seperate the two?
- Client who opens port gets write-lock to port
- Client which subscribes to port gets all read events
- Client with writelock can close port
- All other clients would be notified of closure
- unsubscribe does not close port, leaves port open but releases write locks
- other clients can then write lock port to get read/close control of it
- client dropping off does not close port either