From b57cd42bbd0fd2508ab06ba4adf17d1c2de1eff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 3 Feb 2021 18:17:26 +0800 Subject: #329 use block API --- script/brave/brave.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'script') diff --git a/script/brave/brave.lua b/script/brave/brave.lua index c497c093..44176337 100644 --- a/script/brave/brave.lua +++ b/script/brave/brave.lua @@ -43,12 +43,7 @@ end function m.start() m.push('mem', collectgarbage 'count') while true do - local suc, name, id, params = m.taskpad:pop() - if not suc then - -- 找不到工作的勇者,只好睡觉 - thread.sleep(0.01) - goto CONTINUE - end + local name, id, params = m.taskpad:bpop() local ability = m.ability[name] -- TODO if not ability then -- cgit v1.2.3