xtranophilist/gnome-shell-extension-cpu-temperature — Issue #16: Use asynchronous API
Author: nalimilan
Created: 2011-11-29 19:04:24+00:00
State: open

The extension is using synchronous API like GLib.file_get_contents() and
GLib.spawn_command_line_sync(). This means that *the whole* desktop will freeze each time the graph is refreshed for as long as reading the file and running the command takes. This was reported in this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=664869

Using synchronous API is generally not recommended, but in the Shell it's really considered a bad practice. Please use asynchronous versions of the calls:
- to read a file, use Gio.file_read_async [1].
- to spawn a process, use Glib.spawn_command_line_async() [2].

1: http://developer.gnome.org/gio/stable/GFile.html#g-file-read-aync
2: http://developer.gnome.org/glib/stable/glib-Spawning-Processes.html#g-spawn-command-line-async