Skip to content

Commit

Permalink
Merge branch 'luvit:master' into fix/async-arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
javalikescript authored Nov 22, 2024
2 parents 8a68607 + 3ff02c8 commit e9eea95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ static const char *const luv_runmodes[] = {
static int luv_run(lua_State* L) {
int mode = luaL_checkoption(L, 1, "default", luv_runmodes);
luv_ctx_t* ctx = luv_context(L);
if (ctx->mode != -1) {
lua_pushnil(L);
lua_pushstring(L, "loop already running");
return 2;
}
ctx->mode = mode;
int ret = uv_run(ctx->loop, (uv_run_mode)mode);
ctx->mode = -1;
Expand Down

0 comments on commit e9eea95

Please sign in to comment.