1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Run the queue faster if multiple requests are pending

This commit is contained in:
Dean Herbert 2018-09-06 17:38:15 +09:00
parent 5848c16f5d
commit d05cd52d9a

View File

@ -163,14 +163,16 @@ namespace osu.Game.Online.API
continue;
}
APIRequest req = null;
lock (queue)
if (queue.Count > 0)
req = queue.Dequeue();
if (req != null)
while (true)
{
APIRequest req;
lock (queue)
{
if (queue.Count == 0) break;
req = queue.Dequeue();
}
// TODO: handle failures better
handleRequest(req);
}