where to invoke the new Thread in AMD

in Help Center
Hi,
I have seen the example that was previously posted in the forum...and have gone about it as said...the code was as given
class interpolateJobThread : public IceUtil::Thread
{
virtual void run()
{
while(1)
{
_jobMutex.lock();
if(_jobs.size()!=0)
{
JobPtr firstJob=(JobPtr)_jobs.front();
_jobs.pop_front();
firstJob->execute();
}
_jobMutex.unlock();
Sleep(100);
}
}
};
code8
int main()
{
//...
//we can also start a thead pool to ...
IceUtil::ThreadPtr t = new interpolateJobThread;
IceUtil::ThreadControl tc = t->start();
//...
}
I am writing the code in Java...I am not sure where to create the interpolateJobThread instance and invoke the start method..
please help. Thanks.
I have seen the example that was previously posted in the forum...and have gone about it as said...the code was as given
class interpolateJobThread : public IceUtil::Thread
{
virtual void run()
{
while(1)
{
_jobMutex.lock();
if(_jobs.size()!=0)
{
JobPtr firstJob=(JobPtr)_jobs.front();
_jobs.pop_front();
firstJob->execute();
}
_jobMutex.unlock();
Sleep(100);
}
}
};
code8
int main()
{
//...
//we can also start a thead pool to ...
IceUtil::ThreadPtr t = new interpolateJobThread;
IceUtil::ThreadControl tc = t->start();
//...
}
I am writing the code in Java...I am not sure where to create the interpolateJobThread instance and invoke the start method..
please help. Thanks.
0
Comments
This is more a Java question so I would recommend to post it in a Java forum instead
Benoit.