-
Notifications
You must be signed in to change notification settings - Fork 144
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
Implementation of a view layer #844
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: RestartFU <[email protected]>
@@ -232,6 +235,7 @@ func (s *Session) Close() error { | |||
// close closes the session, which in turn closes the controllable and the connection that the session | |||
// manages. | |||
func (s *Session) close() { | |||
_ = s.viewLayer.Close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should one viewer leaving close the entire view layer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they left?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if multiple sessions has the same view layer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 session = 1 view layer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then why do view layers store multiple sessions at the moment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every player has it's own layer, so that each player can be different, only to a certain player
} | ||
|
||
// Close closes the view layer. | ||
func (v *ViewLayer) Close() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also remove the view layer instance from the viewers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like v = nil
?
Can you be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete(viewer.viewers, v.e)
or something I think, e being the owner of the view layer
I feel like I should revise the naming for this... ( |
Co-authored-by: RestartFU