Results 1 to 2 of 2

Thread: where to invoke the new Thread in AMD

  1. #1
    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.

  2. #2
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can I omit end_xxx in Asynchronous invoke?
    By linkman in forum Help Center
    Replies: 1
    Last Post: 11-23-2010, 02:46 AM
  2. Invoke exception
    By fengshengheli in forum Help Center
    Replies: 2
    Last Post: 03-13-2009, 02:43 AM
  3. Ice 3.1.1 core dump while invoke on replica
    By sinofool in forum Help Center
    Replies: 8
    Last Post: 11-06-2006, 09:32 AM
  4. how to invoke an external shell script in ice?
    By ewiniar in forum Help Center
    Replies: 2
    Last Post: 04-21-2006, 03:28 AM
  5. Replies: 7
    Last Post: 07-18-2005, 04:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •