|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
Run native jobs and protected Lua callbacks on BAS worker threads. More...
#include <lxrc.h>
Public Attributes | |
| HttpServer * | server |
| The server object. More... | |
| lua_State * | Lg |
| Global state. More... | |
| int | runningThreads |
| Threads currently running. More... | |
| int | pendingJobs |
| Jobs queued. More... | |
| int | isDynamic |
| if created via ba.thread.create() More... | |
| int | threads |
| number of threads More... | |
Run native jobs and protected Lua callbacks on BAS worker threads.
The host creates its global manager after HttpServer and the Lua state; applications can create dynamic managers with ba.thread.create. The manager borrows the server and Lua state. Keep both alive until LThreadMgr_destructor returns, and stop submitting work before teardown.
Submit job-owned input through ThreadJob and LThreadMgr_run. Lua callbacks execute with the server mutex held; arbitrary OS threads must not call Lua directly. See ThreadJob_LRun and Advanced Lua Bindings for the callback pattern, and LThreadMgr_constructor for worker and stack settings.
| int LThreadMgr::isDynamic |
if created via ba.thread.create()
| lua_State* LThreadMgr::Lg |
Global state.
| int LThreadMgr::pendingJobs |
Jobs queued.
| int LThreadMgr::runningThreads |
Threads currently running.
| HttpServer* LThreadMgr::server |
The server object.
| int LThreadMgr::threads |
number of threads