Re: Running function asynchronously in gjs

2016-01-13 Thread Per
On Tue, Jan 12, 2016 at 10:44 PM, wrote: > On Tue, Jan 12, 2016 at 10:23 PM Per wrote: > >> Is there a way I can run a command asynchronously in Gnome JavaScript? >> > > There is Gio.Subprocess, but it would be better to do all this without > shelling out in the first place. It's not good to spa

Re: Running function asynchronously in gjs

2016-01-12 Thread philip . chimento
On Tue, Jan 12, 2016 at 10:23 PM Per wrote: > 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-att

Running function asynchronously in gjs

2016-01-12 Thread Per
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',