Browse Source

HACK: eagerly load output pad because pad services cannnot be instanciated from background threads.

A proper fix would be to separate the IOutputPad implementation from the UI, so that output categories can be created and written to from background threads without waiting for the output pad UI to be created.
pull/315/head
Daniel Grunwald 12 years ago
parent
commit
dc316490b3
  1. 1
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ServiceDoozer.cs
  2. 1
      src/Main/SharpDevelop/Workbench/WorkbenchStartup.cs

1
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ServiceDoozer.cs

@ -37,6 +37,7 @@ namespace ICSharpCode.Core @@ -37,6 +37,7 @@ namespace ICSharpCode.Core
// Use ServiceCreatorCallback to lazily create the service
container.AddService(
interfaceType, delegate {
// This callback runs within the service container's lock
if (serviceLoading)
throw new InvalidOperationException("Found cyclic dependency when initializating " + className);
serviceLoading = true;

1
src/Main/SharpDevelop/Workbench/WorkbenchStartup.cs

@ -47,6 +47,7 @@ namespace ICSharpCode.SharpDevelop.Workbench @@ -47,6 +47,7 @@ namespace ICSharpCode.SharpDevelop.Workbench
UILanguageService.ValidateLanguage();
SD.GetService<IOutputPad>(); // HACK: eagerly load output pad because pad services cannnot be instanciated from background threads
TaskService.Initialize();
Project.CustomToolsService.Initialize();

Loading…
Cancel
Save