Q: use threads in ACE to perform different operation Is it possible to use ACE threads in C++ for execution of different tasks?
e.g. suppose the user creates two threads named threadA and threadB. Once they finish their execution on certain functions, can we use the same thread threadA and threadB for some other operation?
If possible then how?

A: what's the benefits?
anyway, you can create your own class derive from ACE_Task
class myjob : public ACE_Task< ACE_MT_SYNCH >
{
    public:
      ......
    //derived from ACE_Task
    virtual int open( void *arg = NULL );
    //derived from ACE_Task
    virtual int svc();
}

than call
this->activate();

in open(); run your job in
int svc()
{
    while( _running )
       ....
}

you can pass messages warpped by ACE_Message_Block( myjob::putq( ACE_Message_Block *pmb, ACE_Time_Value &timeout) ) to myjob, than choose what to do.
