- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Tue, 9 Apr 2013 09:13:18 +0100
- To: Harald Alvestrand <harald@alvestrand.no>
- Cc: "public-media-capture@w3.org" <public-media-capture@w3.org>
On Tue, Apr 9, 2013 at 8:21 AM, Harald Alvestrand <harald@alvestrand.no> wrote: > It seems to me that futures (what I understand of them) are easily able to > implement the "one query, one result" semantic of a callback-based API. Yes, they're good at representing something that will become a value at some point in time. > I think event-based machinery is appropriate when the number of things that > can happen is indeterminate (0, 1 or many); onaddstream is a typical > example. > Is there a version of futures that permits capturing this semantic too? No, you would just use events for that. takePhoto() however uses events for a semantic getMediaStream() uses callbacks for. Why do you keep missing this particular comment? -- http://annevankesteren.nl/
Received on Tuesday, 9 April 2013 08:14:00 UTC