lock q
parent
ded9a561db
commit
de5951f208
|
@ -248,15 +248,18 @@ namespace Cysharp.Threading.Tasks.Linq
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queuedResult.Count != 0)
|
lock (queuedResult)
|
||||||
{
|
{
|
||||||
current = queuedResult.Dequeue();
|
if (queuedResult.Count != 0)
|
||||||
useCachedCurrent = true;
|
{
|
||||||
return current;
|
current = queuedResult.Dequeue();
|
||||||
}
|
useCachedCurrent = true;
|
||||||
else
|
return current;
|
||||||
{
|
}
|
||||||
return default; // undefined.
|
else
|
||||||
|
{
|
||||||
|
return default; // undefined.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue