Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Remove outdated accurate warning in docs (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored Aug 4, 2022
1 parent 766bae3 commit ea4e6ab
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions docs/src/manual/signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,3 @@ id = signal_connect((widget, event) -> cb_buttonpressed(widget, event, guistate,
```

In some situations you may want or need to use an [approach that is more analogous to julia's `@cfunction` callback syntax](../doc/more_signals.md). One advantage of this alternative approach is that, in cases of error, the backtraces are much more informative.

Warning: it is essential to avoid task switching inside Gtk callbacks,
as this corrupts the Gtk C-stack. For example, use `@async print` or queue a message for yourself.
You can also call `GLib.g_yield()` if you need to block. However, if you are still seeing segfaults in some random method due to there existing a callback that recursively calls the glib main loop (such as making a dialog box) or otherwise causes `g_yield` to be called, wrap the faulting code in `GLib.@sigatom`. This will postpone execution of that code block until it can be run on the proper stack (but will otherwise acts like normal control flow).

These restrictions should be fixed once https://github.com/JuliaLang/julia/pull/13099 is merged.

0 comments on commit ea4e6ab

Please sign in to comment.