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 12:33:50 +08:00
committed by GitHub
co-authored by Jiaming Yuan
parent fa3715f584
commit d268a2a463
5 changed files with 71 additions and 14 deletions
-1
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;