Skip to content

Multi threaded applications

Matijs van Zuijlen edited this page Sep 17, 2015 · 3 revisions

The below is no longer relevant, as the code has been incorporated in GirFFI.

Let the GLib/GTK systems set the idle loops for a snappy, responsive UI:

GLib.idle_add GLib::PRIORITY_DEFAULT_IDLE, Proc.new{Thread.pass; true}, nil, nil

Without this line before GTK.main, ^C will not halt the program, and other Thread.new{...} will never run.

Clone this wiki locally