Skip to content

Commit

Permalink
Update book/src/main_event_loop.md
Browse files Browse the repository at this point in the history
Co-authored-by: Fina <[email protected]>
  • Loading branch information
Hofer-Julian and felinira authored Oct 27, 2023
1 parent e65b8ee commit 8079124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/src/main_event_loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ but frequently, we want to run a slightly longer operation in one go.

## How to Avoid Blocking the Main Loop

In order to avoid blocking the main loop, we can spawn a new task with [`gio::spawn_blocking`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/gio/fn.spawn_blocking.html) and let the operation run there.
In order to avoid blocking the main loop, we can spawn a new task with [`gio::spawn_blocking`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/gio/fn.spawn_blocking.html) and let the operation run on the thread pool.

Filename: <a class=file-link href="https://github.com/gtk-rs/gtk4-rs/blob/master/book/listings/main_event_loop/2/main.rs">listings/main_event_loop/2/main.rs</a>

Expand Down

0 comments on commit 8079124

Please sign in to comment.