Thread-safe prediction by making the prediction cache thread-local. (#5853)

Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
This commit is contained in:
boxdot
2020-07-30 06:33:50 +02:00
committed by GitHub
parent fa3715f584
commit d268a2a463
5 changed files with 71 additions and 14 deletions

View File

@@ -55,7 +55,6 @@ struct PredictionCacheEntry {
class PredictionContainer {
std::unordered_map<DMatrix *, PredictionCacheEntry> container_;
void ClearExpiredEntries();
std::mutex cache_lock_;
public:
PredictionContainer() = default;