On Thu, Sep 4, 2008 at 6:00 AM, Shawn Rutledge <[EMAIL PROTECTED]> wrote: > Experience confirms the unit TCP documentation which says that those > TCP socket operations do not block SRFI-18 threads, but what about > socket operations that occur via C code? It would seem that they do > block threads. I just ran into this when I tried to use my gps egg > (under development), which uses libgps to connect to gpsd, in an > application that has a UI. After the SRFI-18 thread which polls for > GPS messages gets started, the UI event loop never even gets a chance > to start. Makes me think the Chicken socket implementation must be > doing something special, not to block the threads. Am I going to run > into the same thing with dbus? I could use gypsy rather than gpsd > (because it has a dbus interface), but dbus comms are also done with > sockets. >
C-level operations that block will block all threads. All Scheme-level thread operations are multiplexed in the scheduler into a big select(3) loop. By supplying a file-descriptor (as you mention in your followup mail) you can take advantage of this. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
