From 6b980b52a564be4d9e50cde45e140f9fb3e840cc Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 22 Jun 2017 17:15:46 -0400 Subject: [PATCH] typo --- lanesintergratetest.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lanesintergratetest.lua b/lanesintergratetest.lua index b70bd70..b6825de 100644 --- a/lanesintergratetest.lua +++ b/lanesintergratetest.lua @@ -1,10 +1,9 @@ package.path="?/init.lua;?.lua;"..package.path -local GLOBAL,lthread=require("multi.intergration.lanesManager").init() +local GLOBAL,sThread=require("multi.intergration.lanesManager").init() require("multi.alarm") require("multi.threading") -for i,v in pairs(lanes.ABOUT) do print(i,v) end multi:newAlarm(2):OnRing(function(self) - GLOBAL["NumOfCores"]=lthread.getCores() + GLOBAL["NumOfCores"]=sThread.getCores() end) multi:newAlarm(7):OnRing(function(self) GLOBAL["AnotherTest"]=true @@ -15,8 +14,8 @@ end) multi:newSystemThread("test",function() -- spawns a thread in another lua process require("multi.all") -- now you can do all of your coding with the multi library! You could even spawn more threads from here with the intergration. You would need to require the interaction again though print("Waiting for variable: NumOfCores") - print("Got it: ",lthread.waitFor("NumOfCores")) - lthread.hold(function() + print("Got it: ",sThread.waitFor("NumOfCores")) + sThread.hold(function() return GLOBAL["AnotherTest"] -- note this would hold the entire systemthread. Spawn a coroutine thread using multi:newThread() or multi:newThreaded... end) print("Holding works!")