[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.
Chris
[1] The equivalent program was:
---------------------------
#!/usr/bin/env guile
!#
(use-modules (event-loop) (ice-9 threads))
(define main-loop (make-event-loop))
(call-with-new-thread
(lambda ()
(let loop ()
(event-post! main-loop (lambda () (display "running ") #f))
(usleep 100000)
(loop))))
(event-loop-block! main-loop #t)
(display "Starting main loop\n")
(event-loop-run! main-loop)
---------------------------
- Potluck - thread safe event loop with await semantics, Chris Vine, 2016/02/16
- Re: Potluck - thread safe event loop with await semantics, David Pirotte, 2016/02/23
- Re: Potluck - thread safe event loop with await semantics, Chris Vine, 2016/02/23
- Re: Potluck - thread safe event loop with await semantics, Chris Vine, 2016/02/23
- Re: Potluck - thread safe event loop with await semantics, David Pirotte, 2016/02/25
- Re: Potluck - thread safe event loop with await semantics, Chris Vine, 2016/02/22