Skip to content

Commit

Permalink
Merge pull request facebook#59 from mlin/more-c-bindings
Browse files Browse the repository at this point in the history
C API: add rocksdb_env_set_high_priority_background_threads
  • Loading branch information
igorcanadi committed Jan 8, 2014
2 parents 9f690ec + 4b1d049 commit a45b7d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@ void rocksdb_env_set_background_threads(rocksdb_env_t* env, int n) {
env->rep->SetBackgroundThreads(n);
}

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

void rocksdb_env_destroy(rocksdb_env_t* env) {
if (!env->is_default) delete env->rep;
delete env;
Expand Down
1 change: 1 addition & 0 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ extern void rocksdb_cache_destroy(rocksdb_cache_t* cache);

extern rocksdb_env_t* rocksdb_create_default_env();
extern void rocksdb_env_set_background_threads(rocksdb_env_t* env, int n);
extern void rocksdb_env_set_high_priority_background_threads(rocksdb_env_t* env, int n);
extern void rocksdb_env_destroy(rocksdb_env_t*);

/* Universal Compaction options */
Expand Down

0 comments on commit a45b7d8

Please sign in to comment.