Hi
I have a simple program running on Linux.
The program implements an Active Object and uses boost::object_pool and boost::thread
It cores when sending lots of messages
Here is the message I get when running gdb
#0 0x0804b840 in boost::simple_segregated_storage<unsigned int>::ordered_free (this=0x988b4d0, chunk=0x988bf2c)
at simple_segregated_storage.hpp:46
46 { return *(static_cast<void **>(ptr)); }
There are 2 threads.
One thread creates Objects using boost::object_pool and enqueues them into a stl queue.
The other Thread dequeues the stl queue and call MyObject::handle.
static boost::object_pool<MyEvent>* _pool;
Class MyObject{
Public:
void handle(){
//do something
_pool->destroy(this);
}
};
_pool = new boost::object_pool<MyObject>(1000);
MyObject* obj = _pool.construct();
Queue.putq(obj);
I would appreciate any thoughts/help
Thank you very much