unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Threads and asyncs
@ 2002-09-02 20:52 Marius Vollmer
  2002-09-02 21:24 ` Tom Lord
  2002-09-03 18:06 ` Marius Vollmer
  0 siblings, 2 replies; 39+ 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-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

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

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-02 20:52 Threads and asyncs Marius Vollmer
2002-09-02 21:24 ` Tom Lord
2002-09-02 21:53   ` Marius Vollmer
     [not found]   ` <87bs7ggiss.fsf@zagadka.ping.de>
2002-09-02 22:24     ` Tom Lord
2002-09-02 23:51       ` Marius Vollmer
2002-09-02 23:02   ` Rob Browning
2002-09-02 23:24     ` Tom Lord
2002-09-02 23:36       ` Tom Lord
2002-09-02 23:52         ` Lynn Winebarger
2002-09-03  0:57           ` Tom Lord
2002-09-03  1:13             ` Thomas Bushnell, BSG
2002-09-03  1:29               ` Tom Lord
2002-09-03  1:31               ` Tom Lord
2002-09-03  1:00         ` Thomas Bushnell, BSG
2002-09-03  1:28           ` Tom Lord
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:45               ` Tom Lord
2002-09-03  1:48               ` Lynn Winebarger
2002-09-04 23:46                 ` Lynn Winebarger
2002-09-05  0:20                   ` Tom Lord
2002-09-05  1:45                     ` Lynn Winebarger
2002-09-05  2:38                       ` Tom Lord
2002-09-05  2:30                         ` Thomas Bushnell, BSG
2002-09-05  2:43                           ` Tom Lord
2002-09-05  2:40                             ` Thomas Bushnell, BSG
2002-09-05  3:00                               ` Tom Lord
2002-09-05  2:57                                 ` Thomas Bushnell, BSG
2002-09-05  3:23                                   ` Tom Lord
2002-09-05  3:14                         ` Lynn Winebarger
2002-09-05  4:00                           ` Tom Lord
2002-09-05  3:51                             ` Thomas Bushnell, BSG
2002-09-05  4:01                           ` Tom Lord
2002-09-05 22:03                             ` Lynn Winebarger
2002-09-03  1:34             ` Thomas Bushnell, BSG
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

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).