Observe R3 events on threadpool
This commit is contained in:
@@ -104,7 +104,7 @@ public partial class CodeEditorPanel : MarginContainer
|
||||
_tabContainer.SetTabTooltip(newTabIndex, file.Path);
|
||||
_tabContainer.CurrentTab = newTabIndex;
|
||||
|
||||
file.IsDirty.Skip(1).SubscribeOnThreadPool().SubscribeAwait(async (isDirty, ct) =>
|
||||
file.IsDirty.Skip(1).SubscribeOnThreadPool().ObserveOnThreadPool().SubscribeAwait(async (isDirty, ct) =>
|
||||
{
|
||||
//GD.Print($"File dirty state changed: {file.Path} is now {(isDirty ? "dirty" : "clean")}");
|
||||
await this.InvokeAsync(() =>
|
||||
|
||||
@@ -278,7 +278,7 @@ public partial class SharpIdeCodeEdit : CodeEdit
|
||||
var project = ((IChildSharpIdeNode)_currentFile).GetNearestProjectNode();
|
||||
if (project is not null)
|
||||
{
|
||||
_projectDiagnosticsObserveDisposable = project.Diagnostics.ObserveChanged()
|
||||
_projectDiagnosticsObserveDisposable = project.Diagnostics.ObserveChanged().SubscribeOnThreadPool().ObserveOnThreadPool()
|
||||
.SubscribeAwait(async (innerEvent, ct) =>
|
||||
{
|
||||
var projectDiagnosticsForFile = project.Diagnostics.Where(s => s.FilePath == _currentFile.Path).ToImmutableArray();
|
||||
|
||||
Reference in New Issue
Block a user