Pthread Samples

Each sample program can be compiled and run independent to the other code. To make an executable out of a source code, write your own Makefile, or:
g++ -o first -lposix4 -lpthread A simple program that creates two identical threads. Each thread reads a shared variable balance and add $1000 to it. Allows a thread t

read more | digg story


%d bloggers like this: