From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.lisp.guile.devel Subject: threads from outside guile Date: 22 Oct 2003 21:04:10 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87y8vdhwed.fsf@kanga.tapsellferrier.co.uk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066853130 18019 80.91.224.253 (22 Oct 2003 20:05:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2003 20:05:30 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Oct 22 22:05:28 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACPEV-0003yx-01 for ; Wed, 22 Oct 2003 22:05:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACPEG-0004cI-RU for guile-devel@m.gmane.org; Wed, 22 Oct 2003 16:05:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ACPEB-0004bh-Eu for guile-devel@gnu.org; Wed, 22 Oct 2003 16:05:07 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ACPDb-0004UY-Kl for guile-devel@gnu.org; Wed, 22 Oct 2003 16:05:02 -0400 Original-Received: from [217.34.135.17] (helo=tf1.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACPDb-0004UG-2D for guile-devel@gnu.org; Wed, 22 Oct 2003 16:04:31 -0400 Original-Received: from host217-34-135-22.in-addr.btopenworld.com ([217.34.135.22] helo=kanga.tapsellferrier.co.uk) by tf1.tapsellferrier.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 1ACPDM-0005ya-00; Wed, 22 Oct 2003 21:04:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=kanga.tapsellferrier.co.uk ident=nferrier) by kanga.tapsellferrier.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 1ACPDG-0005Qn-00; Wed, 22 Oct 2003 21:04:10 +0100 Original-To: guile-devel@gnu.org Original-Lines: 50 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2919 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2919 I've written an HTTP server for guile/scheme. I want to use threads. I want to create the threads from C (there are good reasons for these decisions, believe me). In effect what I want to do is this: server.c main () { init_guile(); for (i = 0; i < 100; i++) make_thread(handler); } handler () { while (1) { get_mutex_lock(); soc = accept(socket); release_mutex_lock(); call_scheme_function(soc); } } I could do this kind of thing with Python, though the C pthreads would have to register themselves with Python first. The current trunk guile doesn't seem to work with threads created outisde of guile and it isn't immediately obvious whether it's possible to do at all... I have worked my way through a little of the code, it seems like I'm getting an exception in the garbage collector (but I'm not really sure). Can anyone give me a clue as to whether guile is supposed to support threads created outside of the scheme environment? If so are they expected to register with guile in some way? If not, any basic overview of how I might add a registration system? Nic Ferrier _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel