chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Repetitive callback into scheme from C thread hangs


From: Matthew David Parker
Subject: Re: [Chicken-users] Repetitive callback into scheme from C thread hangs
Date: Wed, 23 Nov 2005 14:58:08 -0500 (EST)

My program was using an SDL thread, actually, to run.  That's probably the
problem.  I got it running using native threads, using the srfi-18 module.
But, after trying it out I found that I couldn't run anything else at the
same time, so it was sort of pointless.

Consider this:

(define jim (lambda ()
        (begin
                (printf "a\n")
                (sleep 10)
                (printf "b\n"))))

(define jim_thread (make-thread jim))


Then when I run in the interpreter:
> (thread-start! jim_thread)

The read-eval-print loop input is no longer responsive.  It prints out "a"
and then "b" and if i were to type (+ 4 3) in the console it would wait until
the thread is finished and then do (+ 4 3).

I just want to call my game_launch function in a thread and then be able
to run other things in the interpreter.  Is there some easy way to do it,
or is there some example I could look at that does this?




reply via email to

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