Wizcorp / locks

Mutex locks, Read/Write locks, Condition variables and Semaphores in JavaScript
105 stars 19 forks source link

Native support for promises? #15

Open jung-kim opened 6 years ago

jung-kim commented 6 years ago

Would you guys accept PRs for a native support for promises or is it in works?

Or are you guys more fan of promise wrappers?

stelcheck commented 6 years ago

I do not believe anything is currently in the work.

If support would be to be added, I'd prefer if we:

  1. Used native Promises.
  2. Made sure to remain backward compatible with the callback-based API (at least for now)
ronkorving commented 6 years ago

@jung-kim I think your request makes a lot of sense. We would have to establish how we can support both callback and Promise based APIs in an elegant way, but I for one am not against it. Do you have any suggestions as to what the API should look like, given that we also want to maintain backwards compatibility?