Skip to content

Commit

Permalink
fix(pkuxkx): 保证 busy.on-idle 触发的准确率
Browse files Browse the repository at this point in the history
  • Loading branch information
dzpao committed Dec 13, 2023
1 parent 014ec21 commit bec5f5f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions mud/pkuxkx/plugins/basic/busy.tin
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@ VAR {正在等待的回调列表} busy.wait-list {};
};

#alias {busy.on-idle} {
#while { &busy.wait-list[] > 0 } {
#local code {$busy.wait-list[1]};
#list busy.wait-list delete 1;
#undelay busy.checkbusy;
#undelay busy.on-idle;
#untick busy.Halt;

#local todo {$busy.wait-list};
#var busy.wait-list {};

#while { &todo[] > 0 } {
#local code {$todo[1]};
#list todo delete 1;
$code
};

#undelay busy.checkbusy;
};

#action {^你正忙{|ID=basic/busy}$} {
Expand Down

0 comments on commit bec5f5f

Please sign in to comment.