unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Threads and asyncs
@ 2002-09-02 20:52 Marius Vollmer
  0 siblings, 0 replies; 24+ messages in thread
From: Marius Vollmer @ 2002-09-02 20:52 UTC (permalink / raw)


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-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2002-09-04 22:30 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87it1oglmq.fsf@zagadka.ping.de>
2002-09-02 21:24 ` Threads and asyncs Tom Lord
     [not found] ` <200209022124.OAA07625@morrowfield.regexps.com>
2002-09-02 21:53   ` Marius Vollmer
2002-09-02 22:24     ` Tom Lord
     [not found]     ` <200209022224.PAA07962@morrowfield.regexps.com>
2002-09-02 23:51       ` Marius Vollmer
2002-09-02 23:02   ` Rob Browning
     [not found]   ` <87k7m43si7.fsf@raven.i.defaultvalue.org>
2002-09-02 23:24     ` Tom Lord
     [not found]     ` <200209022324.QAA08246@morrowfield.regexps.com>
2002-09-02 23:36       ` Tom Lord
     [not found]       ` <200209022336.QAA08304@morrowfield.regexps.com>
2002-09-02 23:52         ` Lynn Winebarger
     [not found]         ` <0209021852361X.19624@locke.free-expression.org>
2002-09-03  0:57           ` Tom Lord
     [not found]           ` <200209030057.RAA08617@morrowfield.regexps.com>
2002-09-03  1:13             ` Thomas Bushnell, BSG
     [not found]             ` <87admzub73.fsf@becket.becket.net>
2002-09-03  1:29               ` Tom Lord
2002-09-03  1:31               ` Tom Lord
2002-09-03  1:00         ` Thomas Bushnell, BSG
     [not found] ` <87ptvvubst.fsf@becket.becket.net>
     [not found]   ` <200209030128.SAA08719@morrowfield.regexps.com>
2002-09-03  1:23     ` RnRS process/history/documentation (was Re: Threads and asyncs) Lynn Winebarger
2002-09-03  1:27     ` Threads and asyncs Rob Browning
2002-09-03  1:34     ` Thomas Bushnell, BSG
     [not found]     ` <87u1l73ls1.fsf@raven.i.defaultvalue.org>
2002-09-03  1:45       ` Tom Lord
2002-09-03  1:48       ` Lynn Winebarger
2002-09-03  1:28   ` Tom Lord
2002-09-03 18:06 ` Marius Vollmer
2002-09-04  0:28   ` NIIBE Yutaka
2002-09-04 18:02     ` Marius Vollmer
2002-09-04 22:30       ` NIIBE Yutaka
2002-09-02 20:52 Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).