guile-user
[Top][All Lists]
Advanced

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

Re: Potluck - thread safe event loop with await semantics


From: Chris Vine
Subject: Re: Potluck - thread safe event loop with await semantics
Date: Tue, 23 Feb 2016 16:49:10 +0000

On Tue, 23 Feb 2016 12:09:16 +0000
Chris Vine <address@hidden> wrote:
[snip]
> As regards guile-gnome, I guess the problem may well be to do with the
> operation of the garbage collector.  However I suspect it is caused by
> too eager collection rather than too conservative collection - there
> is no obvious sign of excess memory usage.  Probably the collector
> sometimes frees memory still in use by the wrapper when the wrapper is
> invoked in a multi-threaded context.

And also in a single threaded context.  Oh dear.  This will also
segfault, although it takes a lot longer to do it.

--------------------------------
#! /usr/bin/guile-gnome-2
!#

(use-modules (gnome glib))

(define main-loop (g-main-loop-new #f #f))

(g-timeout-add 100
               (lambda ()
                 (g-idle-add (lambda () (display "running ") #f))
                 #t))

(display "Starting main loop\n")

(g-main-loop-run main-loop)
--------------------------------

Chris



reply via email to

[Prev in Thread] Current Thread [Next in Thread]