[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] readline blocks threads
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] readline blocks threads |
Date: |
Wed, 5 Mar 2008 09:33:25 +0100 |
On Tue, Mar 4, 2008 at 10:51 PM, Shawn Rutledge
<address@hidden> wrote:
> On Tue, Mar 4, 2008 at 2:45 PM, Jim Ursetto <address@hidden> wrote:
> > Did you try using rlwrap? It works fine here.
> >
> > $ rlwrap csi
> > #;1> (use srfi-18)
> > #;2> (thread-start! (lambda () (let loop () (printf "loop~%")
> (thread-sleep! 1)
> > (loop))))
> > #<thread: thread0>
> > #;3> loop
> > loop
> > loop
> > loop
>
> That's interesting. But I figured it's a bad design for the dbus egg
> to only work under some circumstances, and I found one that will not
> work if I bury the pollling thread inside the egg.
>
> Maybe the answer is that srfi-18 is a toy, don't take it too
> seriously... or just don't depend on it, because it's up to the user
> to choose to use it or not.
>
> It's a general pattern that I'm looking for: what to do when an egg
> needs to do polling and/or callbacks...
You can use ##sys#thread-wait-for-i/o! + thread-yield to make
a thread block for input/output for a given fd.
cheers,
felix
- Re: [Chicken-users] readline blocks threads, (continued)
Re: [Chicken-users] readline blocks threads, Jim Ursetto, 2008/03/04
- Re: [Chicken-users] readline blocks threads, Shawn Rutledge, 2008/03/04
- Re: [Chicken-users] readline blocks threads, Elf, 2008/03/04
- Re: [Chicken-users] readline blocks threads, Shawn Rutledge, 2008/03/04
- Re: [Chicken-users] readline blocks threads, Graham Fawcett, 2008/03/04
- Re: [Chicken-users] readline blocks threads, Shawn Rutledge, 2008/03/06
- Re: [Chicken-users] readline blocks threads, Elf, 2008/03/06
- Re: [Chicken-users] readline blocks threads, Shawn Rutledge, 2008/03/06
Re: [Chicken-users] readline blocks threads,
felix winkelmann <=