You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--------main.lua-- Wait data with ":getCount()>0"love.thread.newThread[[ local channel=love.thread.getChannel("CHN_1") print("TH 1: Looping...") repeat until channel:getCount()>0 print("TH 1: Received",channel:pop())]]:start()
-- Wait data with ":demand()"love.thread.newThread[[ local channel=love.thread.getChannel("CHN_2") print("TH 2: Demanding...") local v=channel:demand() print("TH 2: Received",v)]]:start()
-- Control group, :demand() will timeout after 5slove.thread.newThread[[ local channel=love.thread.getChannel("CHN_3") print("TH 3: Demanding...") local v=channel:demand(2.6) print("TH 3: Received",v)]]:start()
love.timer.sleep(1)
love.thread.getChannel("CHN_1"):push("DATA 1")
love.thread.getChannel("CHN_2"):push("DATA 2")
functionlove.draw() love.graphics.print("Check console",0,0,0,6) end
No description provided.
The text was updated successfully, but these errors were encountered: