24 Nov
2006
24 Nov
'06
3:57 p.m.
I wrote:
Three things I noticed. I'm not a user of boost.thread, but I did get your example to work. Three things.
(1) I think you want to pass a reference to p1 and c1, rather than copy them. (2) std:string is not thread-safe. (3) You need to delay to allow the other threads time to run.
Sorry, I hacked when I should have been thinking. (3) thread.join() is much better than delay. terry