首页 > 其他分享 >AsyncMessenger

AsyncMessenger

时间:2023-08-25 14:04:01浏览次数:38  
标签:dispatch AsyncMessenger Messenger ms DaemonServer DispatchQueue

how the AsyncMessenger work.

AsyncMessenger  implements Message


//ouput message

DispatchQueue::start => dispatch_thread.create("ms_dispatch") => DispatchQueue::entry() =>  Messenger::ms_deliver_dispatch

=> range dispatchers, call Dispatcher::ms_dispatch2


take DaemonServer for example.

DaemonServer implements Dispatcher,  add Messenger as its member,

call add_dispatcher_tail(this)

=> DaemonServer:: ms_dispatch2


//input message

ProtocolV2::handle_message => AsyncConnection::dispatch_queue

=> DispatchQueue::enqueue

or => DispatchQueue::fast_dispatch


constructure

AsyncMessenger_ceph





标签:dispatch,AsyncMessenger,Messenger,ms,DaemonServer,DispatchQueue
From: https://blog.51cto.com/u_16001762/7230132

相关文章