205
206
// NOTE: the pointer returned by m_message_queue.front() NEEDS to be deleted in Msg::Parse().
206
207
// We have to store messages as pointer to make we still have valid a object after we pop()
207
208
// and the worker thread is accessing the object.
208
TcpConnection::m_thread_pool.add_task( boost::bind(&Msg::Parse, m_username, m_message_queue.front()) );
209
TcpConnection::m_thread_pool.add_task( boost::bind(&Msg::Parse, m_user_id, m_message_queue.front()) );