index.js
function cleanWaiters(state)
{
  var list = state._currentTask.waiters;

  Object.keys(list).forEach(function(job)
  {
    // prevent callback from execution
    // by modifying up `once`'s `called` property
    list[job].callback.called = true;

    // if called it will return false
    list[job].callback.value = false;

    // send termination signal to the job
    list[job].terminator();

    // report termination
    report('killed', state, list[job].command);

    delete list[job];
  });
}
function cleanWaiters(state)
{
  var list = state._currentTask.waiters;

  Object.keys(list).forEach(function(job)
  {
    // prevent callback from execution
    // by modifying up `once`'s `called` property
    list[job].callback.called = true;

    // if called it will return false
    list[job].callback.value = false;

    // send termination signal to the job
    list[job].terminator();

    // report termination
    report('killed', state, list[job].command);

    delete list[job];
  });
}
function cleanWaiters ( state ) { var list = state . _currentTask . waiters ; Object . keys ( list ) . forEach ( function ( job ) { // prevent callback from execution // by modifying up `once`'s `called` property list [ job ] . callback . called = true ; // if called it will return false list [ job ] . callback . value = false ; // send termination signal to the job list [ job ] . terminator ( ) ; // report termination report ( 'killed' , state , list [ job ] . command ) ; delete list [ job ] ; } ) ; }
Cleans leftover jobs provided by the list

@param   {object} state - current state
@returns {void}
Cleans leftover jobs provided by the list