From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ondrej Zajicek Newsgroups: gmane.lisp.guile.user Subject: Guile threads vs GTK loop Date: Sat, 31 Jul 2004 13:26:24 +0200 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <20040731112623.GA21776@feanor> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1091272796 19958 80.91.224.253 (31 Jul 2004 11:19:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 31 Jul 2004 11:19:56 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jul 31 13:19:47 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bqrty-00049y-00 for ; Sat, 31 Jul 2004 13:19:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BqrxG-0000fw-Ai for guile-user@m.gmane.org; Sat, 31 Jul 2004 07:23:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bqrx8-0000fr-TJ for guile-user@gnu.org; Sat, 31 Jul 2004 07:23:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bqrx7-0000fT-QW for guile-user@gnu.org; Sat, 31 Jul 2004 07:23:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bqrx7-0000fJ-NI for guile-user@gnu.org; Sat, 31 Jul 2004 07:23:01 -0400 Original-Received: from [194.108.73.1] (helo=ns3.coprosys.cz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BqrtW-0008Bu-QC for guile-user@gnu.org; Sat, 31 Jul 2004 07:19:19 -0400 Original-Received: from feanor.alias.chrudimsko.czf (snajdrvint.cps.cz [213.151.91.68]) by ns3.coprosys.cz (8.12.8/8.12.9) with ESMTP id i6VBJ7Tn009186 for ; Sat, 31 Jul 2004 13:19:07 +0200 Original-Received: from santiago by feanor.alias.chrudimsko.czf with local (Exim 3.36 #1 (Debian)) id 1Bqs0O-0005kS-00 for ; Sat, 31 Jul 2004 13:26:24 +0200 Original-To: guile-user@gnu.org Content-Disposition: inline X-Operating-System: Debian GNU/Linux unstable User-Agent: Mutt/1.5.6+20040523i X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: neni spam, SpamAssassin (skore=-7.5, vyzaduje 8, BAYES_10 -4.70, USER_AGENT_MUTT -2.80) 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: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3363 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3363 Hello I would like to use Guile (v1.6.4) in GTK app and i want running guile threads while GTK main event loop is still active. If i execute from C code begin-thread and return to C code, thread don't get any processor time. I can call scm_yield() in GTK idle handler (handler called when no events are available) to give some processor time to scheme threads, but i don't know whether there are any running threads (i don't want call scm_yield() if there aren't any). Does anybody knows: - How i can ask whether there are any running guile threads? (To deinstall idle handler where there aren't any.) - How i can be informed (some hook?) whether any new running guile thread appeared? (To reinstall idle handler.) - My Guile-exported C subroutines aren't reentrant. Is there a need to use any locking? Happen guile thread switches even during call to C subroutines? -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@mail.cz, jabber: santiago@njs.netlab.cz) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user