Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-16-2005
vijaykrishna vijaykrishna is offline
Registered User
 
 
Join Date: Jun 2005
Location: India
Posts: 1
where to invoke the new Thread in AMD

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.
Reply With Quote
  #2 (permalink)  
Old 06-16-2005
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
Hi,

This is more a Java question so I would recommend to post it in a Java forum instead . In any case, you'll find code to create and start a Java thread in the IceJ-2.1.1/demo/Ice/session demo for example.

Benoit.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ice 3.1.1 core dump while invoke on replica sinofool Help Center 8 11-06-2006 10:32 AM
how to invoke an external shell script in ice? ewiniar Help Center 2 04-21-2006 04:28 AM
Getting Couldn't invoke on the object to get its interface while binding to IcePack jaggu Help Center 7 07-18-2005 05:38 PM
Ice::Thread and GUI with Qt catalin Help Center 5 09-08-2004 11:20 AM
One proxy one thread? level Help Center 4 03-30-2004 10:05 PM


All times are GMT -4. The time now is 08:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.