# gpui: Add run_embedded and ApplicationHandle for externally driven run loops \(\#60574\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/74798c68d5c63d31e2ccca5c8f5ec0a02c90679c)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 74798c68d5c63d31e2ccca5c8f5ec0a02c90679c

Requested commit: 74798c68d5c63d31e2ccca5c8f5ec0a02c90679c

Commit: 74798c68d5c63d31e2ccca5c8f5ec0a02c90679c

Tree: ba65115864c44970a025520447c3a7a1ffb65c8b

Author: Mikayla Maki

Committer: GitHub

## Message

```
gpui: Add run_embedded and ApplicationHandle for externally driven run loops (#60574)

On ordinary platforms, `Platform::run` blocks for the lifetime of the
app, and `Application::run`'s stack frame keeps the app state alive.
Embedded platforms invert that: the run loop belongs to someone else.

`Application::run_embedded` supports that shape: it starts the app
exactly like `run()`, but returns an `ApplicationHandle` holding the
strong app handle.

Release Notes:

- N/A
```

## Parents

- [86b2831c7c2e210ce150b2771c89dc6bd70ae8a7](https://git.cafe/gitcafe/zed/commit/86b2831c7c2e210ce150b2771c89dc6bd70ae8a7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/74798c68d5c63d31e2ccca5c8f5ec0a02c90679c?format=markdown)
