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

Use async instead of defered for threadpool threads. #8901

Closed
wants to merge 1 commit into from

Commits on Mar 9, 2018

  1. Use async instead of defered for threadpool threads.

    Reason:
    defered means you need to call get/wait first, then
    the thread starts to run.
    async means the thread starts ASAP, wait/get are only
    used to get the result.
    
    The code comment says:
    To wait for the completion of the task, call std::future::wait()
    
    Hence, user would expect wait() is not a method to star the thread.
    It seems more reasonable to start running when the thread is available.
    panyx0718 committed Mar 9, 2018
    Configuration menu
    Copy the full SHA
    d4fd61a View commit details
    Browse the repository at this point in the history