mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 10:36:44 +00:00
Force queue processing end
This commit is contained in:
parent
b212f41fea
commit
ffa223b5b3
1 changed files with 4 additions and 1 deletions
|
@ -79,12 +79,15 @@ public class LuaState : IDisposable
|
|||
/// <returns>Whether the thread can still be resumed and is not finished</returns>
|
||||
public bool ProcessQueue()
|
||||
{
|
||||
while (Dequeue(out var npars))
|
||||
var ncycle = _queue.Count;
|
||||
var done = 0;
|
||||
while (done < ncycle && Dequeue(out var npars))
|
||||
{
|
||||
if (!Resume(npars))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
done++;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue