Advertisement
eao197

Untitled

Feb 2nd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. // We must handle mbox subscription only if it is not MPSC mbox.
  2. if( mbox_type_t::multi_producer_single_consumer != mbox->type() )
  3.     {
  4.         // If there was no subscription for that mbox
  5.         // then new subscription in the mbox must be created.
  6.         if( !is_known_mbox_msg_pair( m_events, ins_result.first ) )
  7.             {
  8.                 try
  9.                     {
  10.                         mbox->subscribe_event_handler( msg_type, owner() );
  11.                     }
  12.                 catch( ... )
  13.                     {
  14.                         // Rollback agent's subscription.
  15.                         m_events.erase( ins_result.first );
  16.                         throw;
  17.                     }
  18.             }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement