1919#include < catch2/internal/catch_console_width.hpp>
2020#include < catch2/reporters/catch_reporter_helpers.hpp>
2121#include < catch2/internal/catch_move_and_forward.hpp>
22- #include < catch2/internal/catch_global_lock.hpp>
2322#include < catch2/catch_get_random_seed.hpp>
2423
2524#include < cstdio>
@@ -463,10 +462,7 @@ void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) {
463462 StreamingReporterBase::sectionEnded (_sectionStats);
464463}
465464
466- // Catch benchmark macros call these functions. Since catch internals are not thread-safe locking is needed.
467-
468465void ConsoleReporter::benchmarkPreparing ( StringRef name ) {
469- auto lock = take_global_lock ();
470466 lazyPrintWithoutClosingBenchmarkTable ();
471467
472468 auto nameCol = TextFlow::Column ( static_cast <std::string>( name ) )
@@ -484,7 +480,6 @@ void ConsoleReporter::benchmarkPreparing( StringRef name ) {
484480}
485481
486482void ConsoleReporter::benchmarkStarting (BenchmarkInfo const & info) {
487- auto lock = take_global_lock ();
488483 (*m_tablePrinter) << info.samples << ColumnBreak ()
489484 << info.iterations << ColumnBreak ();
490485 if ( !m_config->benchmarkNoAnalysis () ) {
@@ -494,7 +489,6 @@ void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) {
494489 ( *m_tablePrinter ) << OutputFlush{};
495490}
496491void ConsoleReporter::benchmarkEnded (BenchmarkStats<> const & stats) {
497- auto lock = take_global_lock ();
498492 if (m_config->benchmarkNoAnalysis ())
499493 {
500494 (*m_tablePrinter) << Duration (stats.mean .point .count ()) << ColumnBreak ();
@@ -512,7 +506,6 @@ void ConsoleReporter::benchmarkEnded(BenchmarkStats<> const& stats) {
512506}
513507
514508void ConsoleReporter::benchmarkFailed ( StringRef error ) {
515- auto lock = take_global_lock ();
516509 auto guard = m_colour->guardColour ( Colour::Red ).engage ( m_stream );
517510 (*m_tablePrinter)
518511 << " Benchmark failed (" << error << ' )'
0 commit comments