From 23944b97dbdf739909a1eb88e8e40f65999677e7 Mon Sep 17 00:00:00 2001 From: godeffroy Date: Wed, 16 Sep 2020 14:03:59 +0200 Subject: [PATCH] PR #3279 - Made the timestep tree thread safe --- native_client/ctcdecode/path_trie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native_client/ctcdecode/path_trie.h b/native_client/ctcdecode/path_trie.h index eac0d7b4..d4d1e7cc 100644 --- a/native_client/ctcdecode/path_trie.h +++ b/native_client/ctcdecode/path_trie.h @@ -109,7 +109,7 @@ private: // TreeNode implementation template TreeNode* add_child(TreeNode* node, ChildDataT&& data_) { - static godefv::memory::object_pool_t> tree_node_pool; + static thread_local godefv::memory::object_pool_t> tree_node_pool; node->children.push_back(tree_node_pool.make_unique(node, std::forward(data_))); return node->children.back().get(); }