[gnome-builder/gnome-builder-43] libide/code: lower priority of release buffer source



commit ce95cc9e3ffb284bf2c54b6dac55235e62718754
Author: Christian Hergert <chergert redhat com>
Date:   Mon Sep 26 15:33:07 2022 -0700

    libide/code: lower priority of release buffer source
    
    We want this to be as low as possible so that other GIdleSource will
    complete before this one. Particularly for things like task completion
    that will be consuming the buffer. We want the hold release delayed until
    those tasks have completed.
    
    But since we can't rely on all async ops calling to complete a task, we
    can't do that release in the finish and have to result to some timing
    and/or main-context tricks like this.

 src/libide/code/ide-buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libide/code/ide-buffer.c b/src/libide/code/ide-buffer.c
index 9956277b0..890500bcb 100644
--- a/src/libide/code/ide-buffer.c
+++ b/src/libide/code/ide-buffer.c
@@ -3995,7 +3995,7 @@ ide_buffer_release (IdeBuffer *self)
     {
       g_assert (self->release_in_idle == 0);
       self->release_in_idle =
-        g_idle_add_full (G_PRIORITY_DEFAULT,
+        g_idle_add_full (G_MAXINT,
                          ide_buffer_release_in_idle,
                          self,
                          g_object_unref);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]