unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Peter TB Brett <peter@peter-b.co.uk>
To: guile-devel@gnu.org
Subject: Re: Delimited continuations to the rescue of futures
Date: Wed, 21 Nov 2012 16:45:43 +0000	[thread overview]
Message-ID: <we1mhaoidhvs.fsf@ssclt001.ee.surrey.ac.uk> (raw)
In-Reply-To: 873903hyd6.fsf@gnu.org

ludo@gnu.org (Ludovic Courtès) writes:

> Hi Peter,
>
> Peter TB Brett <peter@peter-b.co.uk> skribis:
>
>> 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?
>
> It is, IMO.  This is what ‘wip-nested-futures’ currently does.
>
> What Mark said is that, you could imagine a case where computing G
> actually takes much longer than computing F.  In that case, he suggested
> that Thread A computes F.

Okay, I'm *really* confused now.  In the scenario that I've diagrammed
before, why does it matter how long G takes to compute?

> However, as I said, I’m not really convinced by this argument.
> Normally, both F and G are contributions to a larger computation.  It
> shouldn’t matter which one completes first, as long as threads are kept
> busy.

I clearly don't understand the objection, so I can't really comment
either way.  I would quite *like* to understand it -- I'm very
interested in doing practical parallel computations with Guile -- , so
is there any chance that you would be kind enough to explain like I'm
five or something (possibly with diagrams)?

                          Peter

-- 
Peter Brett <peter@peter-b.co.uk>
Remote Sensing Research Group
Surrey Space Centre




  reply	other threads:[~2012-11-21 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 23:36 Delimited continuations to the rescue of futures Ludovic Courtès
2012-11-17  4:38 ` Mark H Weaver
2012-11-17 13:43   ` Ludovic Courtès
2012-11-17 16:56     ` Mark H Weaver
2012-11-17 22:00       ` Ludovic Courtès
2012-11-18 22:19         ` Mark H Weaver
2012-11-20 19:20           ` Ludovic Courtès
2012-11-21 12:18             ` Peter TB Brett
2012-11-21 13:36               ` Ludovic Courtès
2012-11-21 16:45                 ` Peter TB Brett [this message]
2012-11-21 21:19                   ` Ludovic Courtès
2012-11-21 23:28         ` Ludovic Courtès
2013-01-14  2:34 ` Nala Ginrut
2013-01-14 10:37   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=we1mhaoidhvs.fsf@ssclt001.ee.surrey.ac.uk \
    --to=peter@peter-b.co.uk \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).