See an example in the two files fw.C and fr.C in attachment. Although not using threads you should be able to pick the idea.
See an example in the two files fw.C and fr.C in attachment. Although not using threads you should be able to pick the idea.