lib/core.js
function resolveFuture(reject, resolve) {
      state = STARTED
      return future.fork( function(error) { state = REJECTED
                                            value = error
                                            invokePending('rejected', error)
                                            return reject(error) }
  
                        , function(data)  { state = RESOLVED
                                            value = data
                                            invokePending('resolved', data)
                                            return resolve(data) })}
function resolveFuture(reject, resolve) {
      state = STARTED
      return future.fork( function(error) { state = REJECTED
                                            value = error
                                            invokePending('rejected', error)
                                            return reject(error) }
  
                        , function(data)  { state = RESOLVED
                                            value = data
                                            invokePending('resolved', data)
                                            return resolve(data) })}
function resolveFuture ( reject , resolve ) { state = STARTED return future . fork ( function ( error ) { state = REJECTED value = error invokePending ( 'rejected' , error ) return reject ( error ) } , function ( data ) { state = RESOLVED value = data invokePending ( 'resolved' , data ) return resolve ( data ) } ) }
Resolves the future, places the machine in a resolved state, and invokes all pending operations.
Resolves the future places the machine in a resolved state and invokes all pending operations .