
2 Oct
2003
2 Oct
'03
7:53 p.m.
Huck finn wrote:
Hi there, still a newbie question for you guys...
[snip]
1- I'm wondering why the destructor of my FakeClass is called 4 times for each items ???
2- It says in the doc that the function that creates a thread "copies the function wrapped by threadfunc" and threadfunc would be in this case item1 and item2, does this means that the copy constructor is called every time a thread is created with an object?
Thanks all!
Simon
Try adding this add running it again:
FakeClass( const FakeClass& rkToCopy ) :
ID( rkToCopy.ID )
{
boost::mutex::scoped_lock scoped_lock(io_mutex);
std::cout<<"FakeClass #"<