protected virtual void Run() { try { _currentlyRunning.StartRound(); } finally { _currentlyRunning = null; } }
public bool Start(RoundParameters parameters) { if (_currentlyRunning != null) { _queue.Enqueue(parameters); return false; } _thread = new Thread(Main); _currentlyRunning = new Referee(parameters); _thread.Start(this); return true; }
public bool Start(RoundParameters parameters) { if (_currentlyRunning != null) { _queue.Enqueue(parameters); _log.Info("Not starting, already running..."); return false; } _thread = new Thread(Main); _log.Info("Starting: " + parameters); _currentlyRunning = new Referee(parameters); _thread.Start(this); return true; }
protected virtual void Run() { try { _currentlyRunning.StartRound(); } finally { _currentlyRunning = null; if (_queue.Count > 0) { // _log.Info("Starting queued round..."); // Start(RoundParameters.Merge(_queue.ToArray())); // _queue.Clear(); } } }