[racket] the benefactor in THREAD-RESUME

From: Taylor R Campbell (campbell+racket at mumble.net)
Date: Sun Nov 7 20:31:45 EST 2010

   Date: Sun, 7 Nov 2010 18:17:48 -0700
   From: Matthew Flatt <mflatt at cs.utah.edu>

   So far, I don't think I've run into a case in practice where the second
   argument to `thread-resume' wasn't `(current-thread)'.

What about a case of (thread-resume t (current-thread)) where t is not
needed for more than a known dynamic extent or for one sync operation?
Could every use be replaced by (with-thread-resumed t (lambda () ...))
and (with-thread-resumed-evt t e)?  The latter would return an event,
synchronizing which is equivalent to synchronizing e, except that t is
allowed to run at least until the the sync operation commits to a
rendezvous choice.


Posted on the users mailing list.