hemerajs / hemera

🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
MIT License
806 stars 70 forks source link

hermera can't support Promise or Async/Await? #73

Closed arden closed 7 years ago

arden commented 7 years ago

hermera can't support Promise or Async/Await?

StarpTech commented 7 years ago

Currently there is no support for that. There is an example how to execute many acts in parallel or how to compose them with the async package.

Promisyfing the functions aren't enough it would break the error handling.

StarpTech commented 7 years ago

Look at https://github.com/hemerajs/hemera/blob/master/examples/async.js

StarpTech commented 7 years ago

Hi @arden look at PR https://github.com/hemerajs/hemera/pull/76/files#diff-a8e5aaaaec2bc334c0cc45aeae2d52ad I implemented support for generators and promises.

zhaoyao91 commented 7 years ago

+1 look forward to support of async/await

StarpTech commented 7 years ago

Async / Await is only supported by nodejs 7 with the current solution we don't have to transpile anything. We supporting generators with the Co package it behaves almost the same as async / await.