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

Make runBlocking release worker permits before park and reacquire after unpark to avoid starvation #4084

Commits on Apr 11, 2024

  1. IntelliJ patches base

    vsalavatov committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    a73ddcf View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. IJI-1751 Parametrise Maven publication Space URL

    (cherry picked from commit e53add8)
    shchuko authored and vsalavatov committed May 8, 2024
    Configuration menu
    Copy the full SHA
    3dab325 View commit details
    Browse the repository at this point in the history
  2. IJI-1751 Allow setting libs.space.pub as Gradle property

    (cherry picked from commit e7bf19b)
    shchuko authored and vsalavatov committed May 8, 2024
    Configuration menu
    Copy the full SHA
    b49f2aa View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Switch Worker into a Blocking mode if it tries to run runBlocking wit…

    …h a CPU permit
    
    And reacquire CPU permit after runBlocking finishes. This should resolve Dispatchers.Default starvation in cases where runBlocking is used to run suspend functions from non-suspend execution context.
    
    Kotlin#3983 / IJPL-721
    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    efabd25 View commit details
    Browse the repository at this point in the history
  2. Introduce withUnlimitedIOScheduler utility method to use instead of d…

    …irect interaction with Worker
    
    Kotlin#3983 / IJPL-721
    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    94571f6 View commit details
    Browse the repository at this point in the history
  3. Cleanup: rename test

    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    f54d9d0 View commit details
    Browse the repository at this point in the history
  4. Implement permit release also for LimitedDispatcher

    PermitTransfer is extracted to be used both in CoroutineScheduler and in LimitedDispatcher.
    BlockingDispatchAware interface is introduced for LimitedDispatcher.Worker to be accounted by CoroutineScheduler.
    
    Kotlin#3983 / IJPL-721
    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    275a0ad View commit details
    Browse the repository at this point in the history
  5. PermitTransfer: remove PERMIT_ACQUIRE_PARK_NS and make park() indefin…

    …ite because preceding unpark() guarantees it to be non-blocking
    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    bdc9930 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    44b5963 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ce9036d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4356632 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bd29ff6 View commit details
    Browse the repository at this point in the history
  10. Worker should give away local tasks upon requested CPU permit release…

    …, otherwise they may be missed by other workers
    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    183d7f8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    811cbd1 View commit details
    Browse the repository at this point in the history
  12. clean up

    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    4c44035 View commit details
    Browse the repository at this point in the history
  13. Extract and rename test

    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    c7a0fc3 View commit details
    Browse the repository at this point in the history
  14. Make LimitedDispatcher's Worker respect BlockingDispatchAware on its …

    …inner tasks
    
    also fix a probable worker deallocation race issue
    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    de06466 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    adbb5b4 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    3561c13 View commit details
    Browse the repository at this point in the history
  17. Move tests around

    also fix wrong package names
    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    c702d2a View commit details
    Browse the repository at this point in the history
  18. add signalCpuWork()

    vsalavatov committed May 10, 2024
    Configuration menu
    Copy the full SHA
    8568346 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    0e1a97d View commit details
    Browse the repository at this point in the history