Add some thread yields
This commit is contained in:
parent
50b1649f8d
commit
3485f1addd
|
@ -338,6 +338,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
a->batchToCommit = std::move(writeBatch);
|
||||
auto res = a->done.getFuture();
|
||||
writeThread->post(a);
|
||||
threadYield();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -345,6 +346,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
auto a = new Reader::ReadValueAction(key, debugID);
|
||||
auto res = a->result.getFuture();
|
||||
readThreads->post(a);
|
||||
threadYield();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -352,6 +354,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
auto a = new Reader::ReadValuePrefixAction(key, maxLength, debugID);
|
||||
auto res = a->result.getFuture();
|
||||
readThreads->post(a);
|
||||
threadYield();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -359,6 +362,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
|
|||
auto a = new Reader::ReadRangeAction(keys, rowLimit, byteLimit);
|
||||
auto res = a->result.getFuture();
|
||||
readThreads->post(a);
|
||||
threadYield();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue