guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delimited continuations to the rescue of futures


From: Peter TB Brett
Subject: Re: Delimited continuations to the rescue of futures
Date: Wed, 21 Nov 2012 12:18:27 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

This is going to sound like a daft question, but: is there any reason
that the thread that calls 'touch' needs to be the same thread that
calls its continuation?

I.e. why does there need to be a special "main thread"?  Can't "picking
up a job blocking on touch" just be another task allocated to the
thread pool?

Rubbish diagram:

       Thread A                 Thread B
       --------                 --------
   Creates a future F             ...
         ...                 Starts computing F
     Touches F                    ...
Starts computing future G         ...
         ...                 Finishes computing F
         ...              Continues job that touched F


Is this not a plausible approach?

                           Peter

-- 
Peter Brett <address@hidden>
Remote Sensing Research Group
Surrey Space Centre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]