Skip to content

Commit 73d6810

Browse files
committed
Adapt book
1 parent 3c1c081 commit 73d6810

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/src/main_event_loop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Filename: <a class=file-link href="https://github.com/gtk-rs/gtk4-rs/blob/master
7171

7272

7373
> Per default, [`glib::clone!`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/macro.clone.html) returns `()` when upgrading of a weak reference fails.
74-
> [`glib::Receiver::attach`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/struct.Receiver.html#method.attach) expects a closure with a return value of type [`glib::Continue`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/source/struct.Continue.html).
75-
> This is why we specify `@default-return` as `Continue(False)` to clarify that the closure not be called anymore as soon as the upgrade of a weak reference fails.
74+
> [`glib::Receiver::attach`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/struct.Receiver.html#method.attach) expects a closure with a return value of type [`glib::ControlFlow`](https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/enum.ControlFlow.html).
75+
> This is why we specify `@default-return` as `glib::ControlFlow::Break` to clarify that the closure not be called anymore as soon as the upgrade of a weak reference fails.
7676
7777

7878
Spawning threads is not the only way to run operations asynchronously.

0 commit comments

Comments
 (0)