Asynchronous worker thread. Used for long SQL queries or some work of that nature that should not slow down the slave server thread.
Note: You should use local query()
calls instead of server.query()
when
doing SQL queries in worker functions so that none of the slave threads will wait
for query completion.
inline call (name:String, server:Server, project:ProjectInfo, params:Dynamic, workerFunc:_AsyncWorkerFunc):Void
Adds a call to general worker queue.
Parameters:
name
Call name. "profiler.start", "profiler.stop", or "profiler.reset" are reserved.
server
Server instance.
params
Parameters given to worker function.
workerFunc
Worker function. Runs in one of the worker threads. Called like this: workerFunc(async, serverID, params)
.