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

Non blocking ReservedThreadExecutor (#6535) #6559

Merged
merged 1 commit into from Jul 29, 2021

Commits on Jul 28, 2021

  1. Non blocking ReservedThreadExecutor (#6535)

    A call to offer must never block, nor even yield, since to do so give an opportunity for the allocated CPU core to change, defeating the whole purpose of the class.
    There is also some reasonable level of diagnostic warnings if a reserved thread misses too many offers consecutively, based on tracking the state of the reserved thread.
    
    Remove the stack data structure entirely.  ReservedThreads all poll the same SynchronousQueue and tryExecute does a non blocking offer.
    
    Added test for busy shrinking
    
    Remember last time we hit zero reserved threads
    
    Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
    gregw and sbordet committed Jul 28, 2021
    Copy the full SHA
    7a819d1 View commit details
    Browse the repository at this point in the history