linebender / linebender/druid

Cleanup path

Open
#2,161 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

I've came across a big problem with the internal design of druid related to app closing. The library does not provide ANY way to run cleanup code before exiting the main loop. That is cleanup which is a NECESSITY for the `AppDelegate` to properly close because my `AppDelegate` contains a handle to a networking thread which MUST be messaged and joint when the app terminates.

I've tried overriding the `command` function but the QUIT command is never received... I've also tried adding a Drop implementation to my App Delegate but it's also not called.

Can an API be provided to allow calling a cleanup function in `AppDelegate` before exiting the main loop?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the main loop and its handling of the QUIT command, then compare that lifecycle with AppDelegate's Drop implementation and command function. Determine where an AppDelegate cleanup callback could run before the loop exits. Done means the cleanup function is invoked reliably during application shutdown.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.