Questions tagged [pthread-barriers]

A barrier is a point where the thread is going to wait for other threads and will proceed further only when predefined number of threads reach the same barrier in their respective programs.

32 questions
-1
votes
1 answer

Unexpected behaviour of pthread_cond_broadcast

Building on my question from yesterday, here, I wrote a small code sample that starts a number of counting and a number of waiting threads. The waiting threads are stopped pthread_cond_wait until they receive a signal. The signal is sent after the…
Imago
  • 521
  • 6
  • 29
-2
votes
1 answer

How to implement the Game of Life in parallel using C++ threads?

I have implemented a sequential version of the Game of Life but now I want to parallelize it. I have tried using the advice I got from the one answer on here but now I am getting an error when trying to compile. The error says "invalid use of…
Jordan Ward
  • 29
  • 1
  • 7
1 2
3