mirror of
https://github.com/rayaman/multi.git
synced 2026-09-04 23:17:35 -04:00
updated tests and added check in connections
This commit is contained in:
@@ -577,6 +577,9 @@ function multi:newConnection(protect,func,kill)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function c:Connect(func, name)
|
function c:Connect(func, name)
|
||||||
|
if func == nil then
|
||||||
|
multi.error("You must provide a valid function when calling a connection")
|
||||||
|
end
|
||||||
self.Parent.connection_subscriptions = self.Parent.connection_subscriptions + 1
|
self.Parent.connection_subscriptions = self.Parent.connection_subscriptions + 1
|
||||||
local th
|
local th
|
||||||
if thread.getRunningThread then
|
if thread.getRunningThread then
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
Requires multi.lua to be in the same directory or on the Lua path.
|
Requires multi.lua to be in the same directory or on the Lua path.
|
||||||
Compatible with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
|
Compatible with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
|
||||||
]]
|
]]
|
||||||
package.path = "?/init.lua;?.lua;../?/init.lua;../?.lua;" .. package.path
|
package.path = "../?/init.lua;../?.lua;../init.lua;../?.lua;" .. package.path
|
||||||
|
|
||||||
-- ─────────────────────────────────────────────
|
-- ─────────────────────────────────────────────
|
||||||
-- Minimal test runner
|
-- Minimal test runner
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
Requires multi.lua to be in the same directory or on the Lua path.
|
Requires multi.lua to be in the same directory or on the Lua path.
|
||||||
Compatible with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
|
Compatible with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
|
||||||
]]
|
]]
|
||||||
package.path = "?/init.lua;?.lua;./init.lua;./?.lua;" .. package.path
|
package.path = "../?/init.lua;../?.lua;../init.lua;../?.lua;" .. package.path
|
||||||
|
|
||||||
-- ─────────────────────────────────────────────
|
-- ─────────────────────────────────────────────
|
||||||
-- Minimal test runner
|
-- Minimal test runner
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package.path = "../?/init.lua;../?.lua;./init.lua;./?.lua;" .. package.path
|
package.path = "../?/init.lua;../?.lua;../init.lua;../?.lua;" .. package.path
|
||||||
package.cpath = "C:/luaInstalls/lua5.4/lib/lua/5.4/?/core.dll;" .. package.cpath
|
package.cpath = "C:/luaInstalls/lua5.4/lib/lua/5.4/?/core.dll;" .. package.cpath
|
||||||
multi, thread = require("multi"):init{error=true,warning=true,print=true, priority=true}
|
multi, thread = require("multi"):init{error=true,warning=true,print=true, priority=true}
|
||||||
proc = multi:newProcessor("Thread Test",true)
|
proc = multi:newProcessor("Thread Test",true)
|
||||||
|
|||||||
Reference in New Issue
Block a user