ace_reactor学)
Before watching acereactor related articles, also do it yourself knocked on reactor set into the details trap
contrast Figure 1 to see how this function works together, the interaction and impact of functions, the overall understanding of the reactor schema, and the summary of key word
get other reactor systems for quick analysis
The above is the main program and procedures, oh, these are personal opinions, because to see the code in the process to experience N to give up and look at the above process is, for the individual:), figure 2 is mainly composed of members of ACE Reactor, this is related to the important is Reactor as the user interface, to achieve specific forwarding
Figure 2. . The main member of ACE's Reactor (Implementation)
Here's a brief overview of reactor's user interface, API, and [Reactor, h]:
The way ACEReactor uses pimp, I think it should be to block the implementation of the bottom layer, to provide users with a unified user API interface, which involves only a very small
amount of logic,
The underlying implementation is held by the Reactor member variable ACEReactorlmpl ^implementation, which is the pimp technique that isolates the user API interface and the underlying implementation
It is worth noting that the open (size t max_number of handles, int restart, ACESigHandler = 0, *signal_handler = 0, ACE Timer Queue = 0 *timer_queue) this function is very useful, can not call, because in the constructor of the ACE Reactor will be the first to call a default parameter, if you need to customize these parameters, you can manually set up their own call second, which is an interesting parameter, if you do not specify the restart (which is 0), if in the process of select by blocking signal interruption, then Loop will quit, if you specify restart>0 so this case will restart the select call.
handle management function
Including register, remove, suspend, resume handles, not only the 10 event handler, but al
ace reactor学习笔记(ace reactor学习笔记) 来自淘豆网m.daumloan.com转载请标明出处.