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

Refactor server lifecycle management #403

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

josephine-wolf-oberholtzer
Copy link
Member

@josephine-wolf-oberholtzer josephine-wolf-oberholtzer commented Sep 21, 2024

Use a single dedicated function for managing the lifecycle of a server (sync or async), with the control flow in that function managed entirely by futures.

This guarantees that lifecycle event callbacks only execute inside that single lifecycle management function, allowing for async callbacks to be executed in order without needing to resort to spawning new tasks.

This also generally simplifies the server implementation(s), drastically reducing the complexity of callbacks between server, OSC protocol and process prototol.

@josephine-wolf-oberholtzer josephine-wolf-oberholtzer force-pushed the server-lifecycle-events-take-2 branch 2 times, most recently from 1cf5e6d to 2f55efe Compare September 23, 2024 14:36
@josephine-wolf-oberholtzer josephine-wolf-oberholtzer marked this pull request as ready for review September 23, 2024 15:05
@josephine-wolf-oberholtzer josephine-wolf-oberholtzer changed the title Server lifecycle events take 2 Refactor server lifecycle management Sep 23, 2024
@josephine-wolf-oberholtzer josephine-wolf-oberholtzer merged commit fa26590 into main Sep 23, 2024
11 checks passed
@josephine-wolf-oberholtzer josephine-wolf-oberholtzer deleted the server-lifecycle-events-take-2 branch September 23, 2024 15:45
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.

1 participant