| 138 | |
| 139 | |
| 140 | LUA_API lua_State *lua_newthread (lua_State *L) { |
| 141 | lua_State *L1; |
| 142 | lua_lock(L); |
| 143 | luaC_checkGC(L); |
| 144 | L1 = luaE_newthread(L); |
| 145 | setthvalue(L, L->top, L1); |
| 146 | api_incr_top(L); |
| 147 | lua_unlock(L); |
| 148 | luai_userstatethread(L, L1); |
| 149 | return L1; |
| 150 | } |
| 151 | |
| 152 | |
| 153 |
no test coverage detected