glebec / potential

An educational Promises/A+ spec compliant promise library
MIT License
13 stars 3 forks source link

Resolving should lock to first call, even for thenable #22

Open glebec opened 7 years ago

glebec commented 7 years ago

See https://github.com/promises-aplus/promises-spec/issues/246. In short, if it is possible to call resolve multiple times, the first resolve should win — even if it's a pending thenable (non-trusted promise), and subsequent calls are made with immediately-available synchronous values. Potential currently fails this.