[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Calling out to C causing hang
From: |
Chris Double |
Subject: |
[Chicken-users] Calling out to C causing hang |
Date: |
Sat, 5 Apr 2003 20:58:54 +1200 |
User-agent: |
KMail/1.4.3 |
I'm playing around with OpenGL and chicken and have come across a small
problem. I have the following Scheme code:
(define (main)
(let* ((d (simplex:open-display))
(window (simplex:create-window
d 0 0 640 480 "test")))
(let loop ()
(simplex:do-event d)
(loop))))
This calls C functions wrapped using SWIG (as a loadable module) which creates
an X window. DO-EVENT calls XPending and if there are any events, processes
them with XNextEvent.
The code above locks CSI up after after 6 events. The following code works for
ever (well, for a long time until I've quit):
(define (main)
(let* ((d (simplex:open-display))
(window (simplex:create-window
d 0 0 640 480 "test")))
(let loop ()
(gc)
(simplex:do-event d)
(loop))))
All I've added is a (gc). If I add the (gc) after the call to DO-EVENT then it
still locks up. It must be before. Other things work other than GC. For
example a simple DISPLAY but I'm guessing this eventually triggers a GC and
that's why it works.
Any thoughts why this might be occurring?
Chris.
- [Chicken-users] Calling out to C causing hang,
Chris Double <=
- Re: [Chicken-users] Calling out to C causing hang, Joerg F. Wittenberger, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, tonyg, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/05
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang, felix, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/06
- Re: [Chicken-users] Calling out to C causing hang, Tony Garnock-Jones, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Felix Winkelmann, 2003/04/07
- Re: [Chicken-users] Calling out to C causing hang, Chris Double, 2003/04/07