Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Add frame lifecycle event listener #594

Closed
wants to merge 1 commit into from
Closed

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented Oct 18, 2022

Totally experimental, probably a super dumb idea, and just for POC to concretely show what I mean here. I'm not expecting this to be merged.

We also need to handle shutting down the goroutine when a Frame is detached, etc.

We could probably do it without a goroutine, but I didn't explore that.

@inancgumus inancgumus force-pushed the add/eventRemoval branch 2 times, most recently from 336a691 to c1077f6 Compare October 18, 2022 15:02
Adds a new goroutine to the frame manager to track a frame's lifecycle
events (addition and removal).

We also need to handle frame detachment.

And better yet, we can put this logic in the frame, but leave the
management of it to the frame manager.
@inancgumus
Copy link
Member Author

inancgumus commented Oct 18, 2022

Since the current architecture is based on a pubsub event system, IMO, tracking the lifecycle events is a proper solution. However, the architecture and the solution in this PR are complicated, as I suggested here, it would be better to write tests first and then refactor the architecture with a simpler one.

@inancgumus inancgumus closed this Oct 18, 2022
@inancgumus inancgumus deleted the add/eventRemoval branch October 18, 2022 19:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant