TODO: could this use a compiling flag to generate a noop function when released?
()
| 6 | |
| 7 | //TODO: could this use a compiling flag to generate a noop function when released? |
| 8 | func assertInUIThread() { |
| 9 | if g.glib.MainDepth() == 0 { |
| 10 | panic("This function has to be called from the UI thread") |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | //GTK process events in glib event loop (see [1]). In order to keep the UI |
| 15 | //responsive, it is a good practice to not block long running tasks in a signal's |