Skip to content

Commit 07d0d98

Browse files
print mutex for printing for error handling
1 parent 769e8c1 commit 07d0d98

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/print_mutex.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ inline tbb::mutex& get_print_mutex() {
99
}
1010

1111
#endif // PRINT_MUTEX_H
12+
13+
// Add this header to the parallel code you wish to print from
14+
// + the below code to print in parallel code:
15+
//
16+
// {
17+
// tbb::mutex::scoped_lock lock(get_print_mutex());
18+
// std::cout
19+
// << "print "
20+
// << std::endl;
21+
// }

0 commit comments

Comments
 (0)