lean2/tests/lean/loop2.lean
Leonardo de Moura 9398ea5a59 feat(util/shared_mutex): add support for recursive lock at shared_mutex
We need support for recursive locks. The main user of this class is
the environment object. This commit adds a test that demonstrates that
the shared_lock of the environment object may be recursively requested.
Before this fix, the Lean was deadlocking in this example.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-15 22:01:11 -08:00

11 lines
243 B
Text

(**
function add_paren(code)
return "(" .. "** " .. code .. " **" .. ")"
end
parse_lean_cmds(add_paren([[
local env = get_environment()
env:add_var("x", Const("Int"))
print(env:find_object("x"))
]]))
print("done")
**)