From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Threads and asyncs Date: 02 Sep 2002 22:52:13 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87it1oglmq.fsf@zagadka.ping.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030999895 19312 127.0.0.1 (2 Sep 2002 20:51:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 2 Sep 2002 20:51:35 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17lyAX-00051N-00 for ; Mon, 02 Sep 2002 22:51:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lyC1-0007to-00; Mon, 02 Sep 2002 16:53:05 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17lyB7-0007sA-00 for guile-devel@gnu.org; Mon, 02 Sep 2002 16:52:09 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17lyB3-0007rb-00 for guile-devel@gnu.org; Mon, 02 Sep 2002 16:52:07 -0400 Original-Received: from dialin.speedway42.dip21.dokom.de ([195.138.42.21] helo=zagadka.ping.de) by monty-python.gnu.org with smtp (Exim 4.10) id 17lyB2-0007rN-00 for guile-devel@gnu.org; Mon, 02 Sep 2002 16:52:05 -0400 Original-Received: (qmail 12612 invoked by uid 1000); 2 Sep 2002 20:52:13 -0000 Original-To: guile-devel@gnu.org, guile-user@gnu.org Original-Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1223 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1223 Hi, currently, when you mark a system-async, it is run at the next 'safe' point. This does not take the current thread into account and thus, you can not have thread-specific system-asyncs. One example where you might want to have a thread-specific async is when you want to interrupt the computation in a certain thread, the way you can now interrupt the repl via C-c. I would like to specify explicitely that marking a system-async will run its thunk in the thread that did the marking. That should not be a large change since the next safe point will most likely occur before the next thread switch. Also, I'd like to add a function that marks a system-async for a specified thread. The async would run at the next safe point in that thread. The implementation can be changed from a global list of system-asyncs, each with a mark, to a per-thread list of marked system-asyncs. Marking a system-asnyc for a thread would add that system-async to the thread's lists. SCM_ASYNC_TICK would check whether the current thread's list is non-empty. Also, a thread would wake up when it is blocked and run its asyncs anyway. 'sigaction' can be extended to allow marking of an async for a specified thread. With this change, an async would simply be a thunk. We could just use the thunk directly and deprecate the async abstraction. OK? (Non-system asyncs would not be affected.) -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel