MCPcopy Create free account
hub / github.com/Amanieu/asyncplusplus / gtk_wait_handler

Function gtk_wait_handler

examples/gtk_scheduler.cpp:56–60  ·  view source on GitHub ↗

In order to ensure the UI is always responsive, you can disallow blocking calls in the UI thread. Note that the wait handler isn't called when the result of a task is already available, so you can still call .get() on a completed task. This is completely optional and can be omitted if you don't need it.

Source from the content-addressed store, hash-verified

54// completed task. This is completely optional and can be omitted if you don't
55// need it.
56void gtk_wait_handler(async::task_wait_handle)
57{
58 std::cerr << "Error: Blocking wait in UI thread" << std::endl;
59 std::abort();
60}
61
62// Thread which increments the label value every ms
63void label_update_thread(GtkLabel *label)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected