lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I was playing around with coroutines and I think I found a bug when interrupting a running coroutine. (I'm on windows so I'm gonna be using ctrl+c for the interrupt key, so it might not work for everyone)

When doing coroutines:

Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> =coroutine.resume(coroutine.create(function() while true do end end))
[hit ctrl+C here]

When doing pcall:

Lua 5.2.3  Copyright (C) 1994-2013 Lua.org, PUC-Rio
> =pcall(function() while true do end end)
[hit ctrl+C here]
false   interrupted!
>

So is this a bug or am I missing something?