synchronizeAllCrawlers

synchronizeAllCrawlers ( object/string locker , closure method ) : void

Ensures the synchronicity of a task between all crawlers running on the machine. A single task from a single crawler can therefore execute @method under this @locker.

Example



synchronizeAllCrawlers("print", {-> 
print("ACTION")
...
})


Note on multi-thread operations

All Grimport variables are global by default, use "def" to make local variables in your method. Use synchronize to manage shared variables between thread (read and write operations).

See also

synchronize
getOrCreateThreadObject
asynchronous
parallelize
waitDelay

Parameters

locker

An object or a string (ex:guiControl,global,translate,api,disk) which lock the synchronize.
Important: on Cloud servers you must use the standard "guiControl" locker if you want to take control of windows, the mouse or the keyboard, otherwise the script may be excluded.

method

The function which is synchronized