[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
recv! and thread
From: |
William Xu |
Subject: |
recv! and thread |
Date: |
Wed, 01 Mar 2006 13:01:38 +0800 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Hi people,
I want to create a receiver thread for receiving incoming packets. While
when the thread is created, seems it becomes the main thread? the
original guile> prompt is gone. Here is what i did,
(define receiver
(lambda ()
(let ((sock (socket PF_INET SOCK_DGRAM 0))
(buf (make-string 65536)))
(display "receiver running...\n")
(connect sock AF_INET (inet-aton "127.0.0.1") 8000)
(recv! sock buf))))
guile> (make-thread receiver)
#<thread 828785888 (100ca238)>
guile> receiver running...
Any clues?
--
William
- recv! and thread,
William Xu <=