Include lb_tasklib::spawn in globals
This commit is contained in:
6
crates/lb/src/task.lua
Normal file
6
crates/lb/src/task.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
local task = require("lb:task")
|
||||
|
||||
-- include `lb_tasklib::spawn` in the global scope
|
||||
function spawn(f, ...)
|
||||
return task:spawn(f, ...)
|
||||
end
|
||||
@@ -7,6 +7,7 @@ use tokio::task::JoinHandle;
|
||||
pub struct lb_tasklib;
|
||||
|
||||
#[metatype]
|
||||
#[include("task.lua")]
|
||||
impl lb_tasklib {
|
||||
#[new]
|
||||
extern "Lua-C" fn new() -> Self {
|
||||
|
||||
Reference in New Issue
Block a user