syrusakbary / promise

Ultra-performant Promise implementation in Python
MIT License
362 stars 76 forks source link

What's the Difference #53

Closed vikramdurai closed 6 years ago

vikramdurai commented 6 years ago

What's the difference between calling Promise.resolve(func()) and Promise.promisify(func)?

mmerickel commented 6 years ago

Promise.resolve(func()) converts the result of func into a promise and Promise.promisify(func) returns a function that, when called, will return promises