From: Matt Birkholz Date: Fri, 16 Mar 2018 03:03:19 +0000 (-0700) Subject: glib/glib-thread: Run-glib-daemons with glib lock. X-Git-Tag: mit-scheme-pucked-x11-0.2.2~41 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9aa2ce1366b9d519e8a716e2bc8e5929bb6efeb1;p=mit-scheme.git glib/glib-thread: Run-glib-daemons with glib lock. --- diff --git a/src/glib/glib-thread.scm b/src/glib/glib-thread.scm index a274c3b16..fc1939bc9 100644 --- a/src/glib/glib-thread.scm +++ b/src/glib/glib-thread.scm @@ -52,23 +52,22 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (done-tick 0) (next-secondary-tick secondary-gc-rate)) (let glib-thread-loop () - (let ((gc-tick (car (gc-timestamp)))) - (if (fix:< done-tick gc-tick) - (with-glib-lock - (lambda () - (%trace ";run-glib cleaning up\n") - (run-glib-cleanups) - (%trace ";run-glib clean up done\n") - (set! done-tick gc-tick)))) - (if (fix:< next-secondary-tick gc-tick) - (begin - (%trace ";run-glib secondary-gc daemons\n") - (run-glib-daemons) - (%trace ";run-glib secondary-gc daemons done\n") - (set! next-secondary-tick - (fix:+ gc-tick secondary-gc-rate))))) (with-glib-lock (lambda () + (let ((gc-tick (car (gc-timestamp)))) + (if (fix:< done-tick gc-tick) + (begin + (%trace ";run-glib cleaning up\n") + (run-glib-cleanups) + (%trace ";run-glib clean up done\n") + (set! done-tick gc-tick))) + (if (fix:< next-secondary-tick gc-tick) + (begin + (%trace ";run-glib secondary-gc daemons\n") + (run-glib-daemons) + (%trace ";run-glib secondary-gc daemons done\n") + (set! next-secondary-tick + (fix:+ gc-tick secondary-gc-rate))))) (with-thread-timer-stopped (lambda () (let ((time (or (and (thread/next self) 0)