Deque Container with an instant consumer for high speed object dumping I currently have a container that has two features it allows adding objects to it and at the same time an independent thread continuously consumes items from it. It is a FIFO type deque. Which receives object at an extremely high rate. Following is the code for the container

std::deque&lt;Some_object*&gt; my_container;

void Container::Add_item(Some_object* obj)
        {
            try
            {
                {//Begin Lock
                    boost::lock_guard&lt;boost::mutex&gt; lock(mutex_lk);
                    my_container.push_back(obj);
                }
                condition_consumer_silo.notify_one(); 
            }
            catch (std::exception&amp; e)
            {
                __debugbreak();
            }
        }


        //This method continuously consumes object in FIFO order
        void Container::Consume_Object()
        {
            while(true)
                {
                    Some_object* obj;   
                    {//Lock
                        try
                        {
                            boost::unique_lock&lt;boost::mutex&gt; lock(mutex_lk);
                            while(my_container.empty()) { condition_consumer_silo.wait(lock); }//Block if empty - for spurious wakeup

                            if(!my_container.empty())
                            {
                                obj = my_container.front();
                                my_container.pop_front();
                            }
                        }
                        catch (std::exception&amp; e)
                        {
                            __debugbreak();
                        }

                    }//Unlock               
                    try
                    {
                            Consume_obj(obj);

                     } catch (std::exception&amp; e)
                     {
                        __debugbreak();
                     }
                }//end while
        }


Could this container be improved ? Is there a library out there that would do a better job.
Ownership symantics:
void Container::Add_item(Some_object* obj)

Who owns obj?
This is a C-Style interface. Don't do it.
It would be better to pass in as unique_ptr. This shows transfer of ownership. Also with good compiler optimization is no more expensive than a normal pointer. This also results in slight modification in your code to make sure it handles ownership correctly.
Note: I would still use: std::deque&lt;Some_object*&gt; my_container;
Lockless queues
Lock are very expensive (relatively to queue management). There is a concept of thread safe lock-less queues.
If you have a very high frequency modification to the queue then that is something I would look into. see How do I build a lockless queue?