private void StartPlugin(IPlugin plugin, CountdownEvent pluginStarted, CountdownEvent pluginStopped) { var action = plugin.Start(); pluginStopped.Increment(); if (action != null) { pluginStarted.Increment(); pluginStartedTemporary = pluginStarted; plugin.Started += WhenPluginHasStarted; ThreadPool.QueueUserWorkItem(x => ExecuteSafe(action)); } }