Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callbackNextTick method added to API #750

Closed
wants to merge 1 commit into from
Closed

callbackNextTick method added to API #750

wants to merge 1 commit into from

Commits on May 4, 2015

  1. callbackNextTick method added to API

    Sometimes an async function needs tor return  a sync result. For the sake of consistency of async flow; we need to call the callback function wrapped in a nextTick block. This new method simplifys this effort.
    
    Example:
    ```js
    function asyncFn (other_arguments, callback) {
      if (cached_result) {
        return async.callbackNextTick(callback, cached_result);
      }
      some_async_call(some_arguments, callback);
    }
    ```
    mstdokumaci committed May 4, 2015
    Configuration menu
    Copy the full SHA
    4b8de42 View commit details
    Browse the repository at this point in the history