forked from zeng-github01/OC-Doc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.lua
More file actions
29 lines (24 loc) · 1016 Bytes
/
process.lua
File metadata and controls
29 lines (24 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---@meta
--- OpenComputers Process API
---
--- Provides rudimentary process management utilities.
---@class ProcessLib
local process = {}
--- Loads a Lua script or function as a process with a custom environment.
---@param path string|function Absolute path or function
---@param env table? Custom environment (nil if path is a function)
---@param init function? Initialization function (optional)
---@param name string? Process name (optional)
---@return thread Coroutine for the process
function process.load(path, env, init, name) end
--- Returns a table with info about the current or parent process.
---@param level number? Stack level (1=current, 2=parent, ...)
---@return table Process info
function process.info(level) end
--- (Deprecated) Returns the path, environment, and name of the current or parent process.
---@param level number? Stack level (1=current, 2=parent, ...)
---@return string Path
---@return table Environment
---@return string Name
function process.running(level) end
return process