aboutsummaryrefslogtreecommitdiff
path: root/tests/irayo_recursive.lua
blob: 3eb14b8eb80e43aa4c5284294383b969e9fabf24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--
-- Bugs filed by irayo Jul-2008
--
--[[
This code showed lack of caching 'select', 'type' etc. in 'src/lanes.lua'.
]]
local function recurse()
    print("level "..i);
    if i > 10 then return "finished" end

    local lanes = require "lanes"
    lanes.configure( 1, "NO_TIMERS")

    local lane = lanes.gen( "*", { globals = { ["i"]= i + 1 } }, recurse ) ()
    return lane[1]
end

i = 0;
recurse()