RequestList::receive in a multithreaded environment

Dan Perl dperl____taralnetworks.com
Tue Feb 18 22:30:19 CET 2003


I have problems getting RequestList::receive to run in a different thread
than the main thread.  I am using ACE threads and I create a worker thread
that invokes the RequestList::receive method with a limited, positive
timeout.  The request is detected by the receive method, but the contents of
the request are invalid: ((*pdu).vbs[0]).iv_vb_oid.smival.value.oid.ptr = 0.
I guess there is some memory allocated for the task and that memory is lost
somehow.

 

Anyway, the behavior may not be so relevant, but it's pretty clear that
there is a conflict there in using RequestList in a multithreaded
environment.  I saw that RequestList is itself a subclass of ThreadManager
which is a subclass of Synchronized, so there is some threads work in
RequestList itself.  How should I use RequestList::receive to make it work
in a non-main thread?

 

Regards,

 

Dan Perl

Taral Networks

Ottawa, Canada

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20030218/bc6032a9/attachment.htm 


More information about the AGENTPP mailing list