Running function asynchronously in gjs
- From: Per <pmknutsen gmail com>
- To: javascript-list gnome org
- Subject: Running function asynchronously in gjs
- Date: Tue, 12 Jan 2016 22:23:09 -0800
I am currently spawning a shell command from my Gnome extension synchronously with Util.spawn(). The command updates icon emblems, and may run hundreds of times consecutively inside a for() loop. The command is:
Util.spawn_async(['gvfs-set-attribute', MYPATH, '-t', 'stringv', 'metadata::emblems', EMBLEM]);
The repeating spawning, perhaps unsurprisingly, locks up the entire Gnome desktop.
Is there a way I can run a command asynchronously in Gnome _javascript_?
- Per
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]