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




If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/