swh:1:snp:5115096b921df712aeb2a08114fede57fb3331fb
Revision 3df07d1703297cf8bf98327c1dc65f48d18957f5 authored by sdong on 19 May 2014, 17:40:18 UTC, committed by sdong on 19 May 2014, 18:52:12 UTC
Summary:
Add a feature to decrease the number of threads in thread pool.
Also instantly schedule more threads if number of threads is increased.

Here is the way it is implemented: each background thread needs its thread ID. After decreasing number of threads, all threads are woken up. The thread with the largest thread ID will terminate. If there are more threads to terminate, the thread will wake up all threads again.

Another change is made so that when number of threads is increased, more threads are created and all previous excessive threads are woken up to do the work.

Test Plan: Add a unit test.

Reviewers: haobo, dhruba

Reviewed By: haobo

CC: yhchiang, igor, nkg-, leveldb

Differential Revision: https://reviews.facebook.net/D18675
1 parent 1e56045
History
Tip revision: 19076c95aa2bcee55c26fcf0960cc844ad86ee9c authored by Levi Tamasi on 21 January 2021, 22:18:25 UTC
Update HISTORY.md for PR 7888 (#7890)
Tip revision: 19076c9
File Mode Size
build_tools
coverage
db
doc
examples
hdfs
helpers
include
java
linters
port
table
third-party
tools
util
utilities
.arcconfig -rw-r--r-- 246 bytes
.clang-format -rw-r--r-- 138 bytes
.gitignore -rw-r--r-- 331 bytes
.travis.yml -rw-r--r-- 1.0 KB
CONTRIBUTING.md -rw-r--r-- 759 bytes
HISTORY.md -rw-r--r-- 5.8 KB
INSTALL.md -rw-r--r-- 3.4 KB
LICENSE -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 20.3 KB
PATENTS -rw-r--r-- 1.4 KB
README.md -rw-r--r-- 1.3 KB
ROCKSDB_LITE.md -rw-r--r-- 1020 bytes

README.md

back to top