Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository:MagicPixel/ThreadPool
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base:master
Choose a base ref
...
head repository:log4cplus/ThreadPool
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare:master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 12, 2018

  1. Allow threads pool re-sizing.

    @wilx
    wilx committed Jun 12, 2018
    Configuration menu
    Copy the full SHA
    d8880dfView commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2018

  1. Configuration menu
    Copy the full SHA
    cc0b637View commit details
    Browse the repository at this point in the history

Commits on May 22, 2020

  1. Fix livelock during shutdown and downsizing.

    When destruction starts or the pool size is reduced, only the last worker thread could in fact stop, while the other workers that should stop would enter a busy wait state, since the condition they are waiting for via a condition variable would be satisfied. The busy waiting threads could starve the last thread from CPU, delaying downsizing or shutdown. This is particularly noticable when running via Valgrind; shutdown delays in the order of tens of seconds have been observed. Fix it by making each thread stop as soon as it can. Doing this required adjusting the management of the workers vector: - When a worker is stopping, it may not yet be possible to downsize the vector (if it is not the last worker). In that case an invalid thread entry is left in the vector, and the vector will be downsized when possible as other threads stop. - When upsizing, some threads above the current limit may still be running (if there was a recent downsizing and they haven't stopped yet). Such threads just keep running.
    @ambrop72
    ambrop72 committed May 22, 2020
    Configuration menu
    Copy the full SHA
    63930eeView commit details
    Browse the repository at this point in the history

Commits on May 29, 2020

  1. Merge pull requestlog4cplus#1from ambrop72/livelock-fix

    Fix livelock during shutdown and downsizing.
    @wilx
    wilx authored May 29, 2020
    Configuration menu
    Copy the full SHA
    fc20ceeView commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2021

  1. Configuration menu
    Copy the full SHA
    cb98175View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3507796View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2024

  1. Make enqueue() not to block. Add enqueue_block() that blocks.

    This is a change of semantics for the `enqueue()` function. If it would block, it returns ready `future` instance with `would_block` exception.
    @wilx
    wilx committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    251db61View commit details
    Browse the repository at this point in the history
Loading