Return values from callbacks?
Hello Hackers, If there was a easy way to wrap an asynchronous in a synchronous API would it not be easy? Because we can wrap it that way any API will need to accept a callback to return proceed values. I bit be speaking absolute non sense here, but just felt something like that might makes things easier, while I was coding THIShttps://github.com/hemanth/node-rsj/commit/051c6c45c15e2cebc88dae20b28ffe3335823335 -- *'I am what I am because of who we all are'* h3manth.com http://www.h3manth.com *-- Hemanth HM * ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Return values from callbacks?
See dherman's http://taskjs.org/ for one way that ES6 will support, but which requires expliciti 'yield' usage when you wrap to make the preemption point clear. /be Hemanth H.M wrote: Hello Hackers, If there was a easy way to wrap an asynchronous in a synchronous API would it not be easy? Because we can wrap it that way any API will need to accept a callback to return proceed values. I bit be speaking absolute non sense here, but just felt something like that might makes things easier, while I was coding THIS https://github.com/hemanth/node-rsj/commit/051c6c45c15e2cebc88dae20b28ffe3335823335 -- /'I am what I am because of who we all are'/ h3manth.com http://www.h3manth.com /-- Hemanth HM/ ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: Return values from callbacks?
WOW! Ok, thank you. On Thu, Jun 21, 2012 at 8:32 PM, Brendan Eich bren...@mozilla.org wrote: See dherman's http://taskjs.org/ for one way that ES6 will support, but which requires expliciti 'yield' usage when you wrap to make the preemption point clear. /be Hemanth H.M wrote: Hello Hackers, If there was a easy way to wrap an asynchronous in a synchronous API would it not be easy? Because we can wrap it that way any API will need to accept a callback to return proceed values. I bit be speaking absolute non sense here, but just felt something like that might makes things easier, while I was coding THIS https://github.com/hemanth/**node-rsj/commit/** 051c6c45c15e2cebc88dae20b28ffe**3335823335https://github.com/hemanth/node-rsj/commit/051c6c45c15e2cebc88dae20b28ffe3335823335 -- /'I am what I am because of who we all are'/ h3manth.com http://www.h3manth.com /-- Hemanth HM/ __**_ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/**listinfo/es-discusshttps://mail.mozilla.org/listinfo/es-discuss -- *'I am what I am because of who we all are'* h3manth.com http://www.h3manth.com *-- Hemanth HM * ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss