[Top][All Lists]

[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 01:30:34 +0000

On Tue, 23 Feb 2016 00:31:21 +0000
Chris Vine <address@hidden> wrote:
> On Mon, 22 Feb 2016 1
> When I tested guile-gnome a few years ago I could reliably get
> g-idle-add to crash when calling it from a worker thread.  If that is
> no longer the case I am pleased to hear it.  However, the little test
> program at the end[1], which prints to the screen every 1/10th of a
> second, will also segfault for me if I run it in a terminal for
> somewhere between 1 and 5 minutes.  It seems to crash more readily if
> it is in a terminal not on the current virtual desktop, but will in
> the end crash even when it is.

To complete the picture, since testing guile-gnome I have run the same
program on my alternative event loop[1], and it has been running for 55
minutes without problems.  So it does not seem to be a guile threading
issue.  There definitely seems to be something wrong with guile-gnome
itself as regards thread safety.


[1]  The equivalent program was:

#!/usr/bin/env guile

(use-modules (event-loop) (ice-9 threads))

(define main-loop (make-event-loop))

 (lambda ()
   (let loop ()
     (event-post! main-loop (lambda () (display "running ") #f))
     (usleep 100000)

(event-loop-block! main-loop #t)
(display "Starting main loop\n")
(event-loop-run! main-loop)

reply via email to

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