diff --git a/src/hlua_fcn.c b/src/hlua_fcn.c index 91c5155d2..63366694f 100644 --- a/src/hlua_fcn.c +++ b/src/hlua_fcn.c @@ -542,7 +542,7 @@ static int hlua_queue_size(lua_State *L) struct hlua_queue *queue = hlua_check_queue(L, 1); BUG_ON(!queue); - lua_pushinteger(L, queue->size); + lua_pushinteger(L, HA_ATOMIC_LOAD(&queue->size)); return 1; }