mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fix lock
This commit is contained in:
@@ -353,17 +353,16 @@ internal class AnsiResponseParser<T> : AnsiResponseParserBase
|
||||
return output;
|
||||
}
|
||||
|
||||
public IEnumerable<Tuple<char, T>> Release ()
|
||||
public Tuple<char, T>[] Release ()
|
||||
{
|
||||
// Lock in case Release is called from different Thread from parse
|
||||
lock (lockState)
|
||||
{
|
||||
foreach (Tuple<char, T> h in HeldToEnumerable ())
|
||||
{
|
||||
yield return h;
|
||||
}
|
||||
Tuple<char, T> [] result = HeldToEnumerable ().ToArray ();
|
||||
|
||||
ResetState ();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user