From: Dan Stark <interlock.public@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] How is Async implemented?
Date: Tue, 3 Jun 2014 16:39:11 +0100 [thread overview]
Message-ID: <CANQp=sT+7EgYnXaTZQfmUkYmWqgmODijbrsY25Huz=Eq=CK28g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 876 bytes --]
Hi all
I am trying to get a rough overview of how Async is implemented (or the
idea behind it) before I really dig into its source code.
I have the following questions:
*Q1:* Is Async event-loop like?
From the API and some docs for Async's usage, I feel it is quite like a
event-loop.
You create Deferred.t and it might be added to a queue and a scheduler
behind might be adjusting the order of running for all Deferred.t in the
queue.
Am I correct?
*Q2:* Deferred.return and Deferred.bind
If I say
Deferred.return 1
It will returns me a Deferred.t, but inside the function *return* or *bind*
somehow an "event" is implicitly added to the default queue for scheduling,
right?
If I am correct above,
*Q3:* Is Async depending on -thread? The queue or scheduler needs compiler
support?
I just need to understand the whole picture in a rough way first.
Thanks
Dan
[-- Attachment #2: Type: text/html, Size: 1664 bytes --]
next reply other threads:[~2014-06-03 15:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 15:39 Dan Stark [this message]
2014-06-03 16:29 ` David House
2014-06-03 20:59 ` Dan Stark
2014-06-03 22:33 ` Ashish Agarwal
2014-06-03 23:17 ` Dan Stark
2014-06-03 23:17 ` Yaron Minsky
2014-06-03 23:51 ` Dan Stark
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANQp=sT+7EgYnXaTZQfmUkYmWqgmODijbrsY25Huz=Eq=CK28g@mail.gmail.com' \
--to=interlock.public@gmail.com \
--cc=caml-list@inria.fr \
/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