Create threads to update GUI
This commit is contained in:
@@ -31,13 +31,6 @@ namespace ProgramLib
|
||||
{
|
||||
private EventWaitHandle[] _events = new EventWaitHandle[Enum.GetValues(typeof(Events)).Cast<int>().Max() + 1];
|
||||
|
||||
// specify which event should have to be manually reset
|
||||
List<Events> _manualEventList = new List<Events>
|
||||
{
|
||||
Events.GLOBAL_QUIT,
|
||||
Events.FATAL_FAILURE
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The private constructor
|
||||
/// </summary>
|
||||
@@ -45,12 +38,7 @@ namespace ProgramLib
|
||||
{
|
||||
for (int i = 0; i < _events.Count(); i++)
|
||||
{
|
||||
if (_manualEventList.Contains((Events)i))
|
||||
{
|
||||
_events[i] = new ManualResetEvent(false);
|
||||
}
|
||||
else
|
||||
_events[i] = new AutoResetEvent(false);
|
||||
_events[i] = new ManualResetEvent(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user