feat: add combobox filter
This commit is contained in:
@@ -57,8 +57,8 @@ GPUI is a UI framework which also provides primitives for state and concurrency
|
||||
- All use of entities and UI rendering occurs on a single foreground thread.
|
||||
- `cx.spawn(async move |cx| ...)` runs on the foreground thread; from a `Context<T>` it looks like `cx.spawn(async move |this, cx| ...)`.
|
||||
- `cx.background_spawn(async move { ... })` runs work on other threads.
|
||||
- Both return a `Task<R>`; dropping it cancels the work. Prevent cancellation by awaiting, detaching deliberately, or storing the task in a field.
|
||||
- Prefer keeping a task in a field over `.detach()` when the work belongs to a view or store; a detached task outlives its owner. A finished `Task` held in a container is not reaped — drop finished handles or hold a single `Option<Task<_>>`.
|
||||
- Both return a `Task<R>`; dropping it cancels the work. Prevent cancellation by awaiting or storing the task in a field.
|
||||
- Every task tied to a component must be stored on it: `tasks: Vec<Task<_>>` or `task: Option<Task<_>>`. Never `.detach()` a component's task — a detached task outlives its owner. gpui cleans finished tasks up automatically, so just push; no retain or prune logic.
|
||||
|
||||
## Rendering and state
|
||||
|
||||
|
||||
Reference in New Issue
Block a user