blob: 7286fa5ccb0d2cbae5f62821f3cdcaffa34346fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
local lanes = require "lanes".configure{with_timers=false}
local linda = lanes.linda()
local coro = coroutine.create(function() end)
-- we are not allowed to send coroutines through a lanes
-- however, this should raise an error, not hang the program...
print( pcall(linda.send,linda, 'test', "oh boy"))
print( pcall(linda.send,linda, 'test', coro))
k,res = linda:receive('test')
print( res)
-- linda:send( 'test', coro)
|