File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -496,10 +496,11 @@ namespace SampleFlow
496496 // but we don't care about that) and terminate it. We have to be mindful
497497 // that this function may have been called at the same time as a sample
498498 // was sent, and because the sample processing machinery queries the
499- // state of the connections, we need to do things under a
500- // mutex
499+ // state of the connections, we need to do things under the
500+ // mutices for both synchronous and asynchronous mode:
501501 {
502- std::lock_guard<std::mutex> parallel_lock (asynchronous_mode_mutex);
502+ std::lock_guard<std::mutex> parallel_lock_1 (asynchronous_mode_mutex);
503+ std::unique_lock<std::shared_mutex> parallel_lock_2 (synchronous_mode_mutex);
503504
504505 auto x = connections_to_producers.find (&p);
505506
You can’t perform that action at this time.
0 commit comments