module

Egui::SystemPorts::AsyncDialogs

Fiber-backed request registry behind the async dialogs.

Delivery model: the worker fiber calls on_done itself the moment work finishes (same thread, always BETWEEN frames — the backend loop may be blocked in its scheduler wait, never mid-frame) and bumps a delivered counter that the backend consumes as a produce-a-frame trigger (take_delivered). With the detached backend the scheduler runs fibers naturally, so completion also knocks on the backend doorbell via Egui::Runtime.wake; with the legacy single-thread backend (sapp_run never yields), the backend gives the scheduler one bounded pass per frame (pump_pass) — completions land during that pass and are counted the same way.

Class methods

pending?

True while at least one dialog is open — for spinners etc.

Source
pump_pass

Legacy backend crutch: one bounded scheduler pass per frame so worker fibers advance inside sapp_run's blocking C loop. The detached backend never calls this — its fibers run between frames on their own.

Source
start(work : -> String | Nil, on_done : String | Nil -> ) : Request

Start work in its own fiber; on_done fires when work finishes (in that fiber — see the module comment).

Source
take_delivered

Consume the completed-request count — their callbacks already ran; the count only tells the backend a full frame must follow.

Source

Nested types