< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate-users] Multithreading in reSIProcate stack


Hi.

How do I process incoming requests in reSIProcate in multiple threads to 
increase server performance?

I tried to process messages from TransactionUser queue in multiple threads 
(https://gist.github.com/NeverLuckyKg/fa8a652afdb15677e28788aa8f9a09b4), but it 
doesn’t increase maximum number of requests that server can process in unit of 
time.

Message queue worker thread:

//class resiprocate_dialog : public resip::TransactionUser
void resiprocate_dialog::process(int max_timeout) {
    std::auto_ptr<resip::Message> message;
    message.reset(mFifo.getNext(max_timeout));
    auto sip = dynamic_cast<resip::SipMessage*>(message.get());
    if (sip) process_message(sip);
}

Any ideas what I should try next?

Thanks, Sergey.