Skip to content

Commit

Permalink
feat: export SetBackgroundThreads(n, Env::BOTTOM);
Browse files Browse the repository at this point in the history
  • Loading branch information
developerfred committed Jul 28, 2020
1 parent c0c33a4 commit f900f6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions db/c.cc
Expand Up @@ -3835,6 +3835,10 @@ void rocksdb_env_set_high_priority_background_threads(rocksdb_env_t* env, int n)
env->rep->SetBackgroundThreads(n, Env::HIGH);
}

void rocksdb_env_set_background_threads_disable(rocksdb_env_t* env, int n) {
env->rep->SetBackgroundThreads(n, Env::BOTTOM);
}

void rocksdb_env_join_all_threads(rocksdb_env_t* env) {
env->rep->WaitForJoin();
}
Expand Down
2 changes: 2 additions & 0 deletions include/rocksdb/c.h
Expand Up @@ -1555,6 +1555,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_env_set_background_threads(
rocksdb_env_t* env, int n);
extern ROCKSDB_LIBRARY_API void
rocksdb_env_set_high_priority_background_threads(rocksdb_env_t* env, int n);
extern ROCKSDB_LIBRARY_API void rocksdb_env_set_background_threads_disable(
rocksdb_env_t* env, int n);
extern ROCKSDB_LIBRARY_API void rocksdb_env_join_all_threads(
rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_lower_thread_pool_io_priority(rocksdb_env_t* env);
Expand Down

0 comments on commit f900f6b

Please sign in to comment.