Object T.async
The T.async interface provides methods to help you do long running I/O tasks that do not block the fast packet pipeline path. For introduction to Async scripting operations. See Async operations introduction
Purpose of T.async
To execute long running I/O tasks in a separate worker pool to prevent blocking the Trisul streaming pipelines. The default worker thread pool size is 1, it can be increased at the script level by TrisulPlugin.request_async_workers parameter
Methods
function | parameters | what it does |
---|---|---|
cat | from_file,to_file | Append one file to another |
copy | from_file,to_file | Copy one file to another |
rm | filename : string | Delete a file |
copybuffer | from_buffer (a Buffer object), to_file | Append buffer content bytes to the target file |
schedule | a LUA schedule block | Runs the LUA functions in the block asynchronosly and re-enter the fast path at a later time when results are ready |