mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +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>
|
/// <returns>Whether the thread can still be resumed and is not finished</returns>
|
||||||
public bool ProcessQueue()
|
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))
|
if (!Resume(npars))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
done++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue