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