From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Henri_H=E4kkinen?= Newsgroups: gmane.lisp.guile.user Subject: multi-threading Date: Sun, 06 Jul 2008 01:14:19 +0300 Message-ID: <486FF23B.6000301@pp2.inet.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable X-Trace: ger.gmane.org 1215296080 15073 80.91.229.12 (5 Jul 2008 22:14:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jul 2008 22:14:40 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jul 06 00:15:27 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KFG2L-0003zr-Nv for guile-user@m.gmane.org; Sun, 06 Jul 2008 00:15:21 +0200 Original-Received: from localhost ([127.0.0.1]:60771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFG1U-00016s-Nd for guile-user@m.gmane.org; Sat, 05 Jul 2008 18:14:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KFG1R-00016n-48 for guile-user@gnu.org; Sat, 05 Jul 2008 18:14:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KFG1O-00016b-NO for guile-user@gnu.org; Sat, 05 Jul 2008 18:14:23 -0400 Original-Received: from [199.232.76.173] (port=54609 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFG1O-00016Y-H3 for guile-user@gnu.org; Sat, 05 Jul 2008 18:14:22 -0400 Original-Received: from mta-out.inet.fi ([195.156.147.13]:55690 helo=jenni1.rokki.sonera.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KFG1O-0006Nh-7M for guile-user@gnu.org; Sat, 05 Jul 2008 18:14:22 -0400 Original-Received: from [192.168.11.2] (88.193.128.169) by jenni1.rokki.sonera.fi (8.5.014) (authenticated as hakkh-2t) id 483E82F1019EC247 for guile-user@gnu.org; Sun, 6 Jul 2008 01:14:20 +0300 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6628 Archived-At: Hello, I am trying to use Guile from an multi-threaded application. Here is a=20 sample code: // test.c #include #include static void * inner_thread (void *p) { scm_c_eval_string ("(newline)"); return NULL; } static void * thread (void *p) { return scm_with_guile (inner_thread, p); } static void inner_main (void *closure, int argc, char **argv) { pthread_t thr; pthread_create (&thr, NULL, thread, NULL); pthread_join (thr, NULL); } int main (int argc, char **argv) { scm_boot_guile (argc, argv, inner_main, NULL); return 0; } I have read from the Guile manual that I should be able to use threads=20 in this way. However, I get ERROR: Stack overflow. Do you know where is=20 the problem? Running `guile --version` returns "Guile 1.8.1". -- Henri H=E4kkinen