[Ace-users] Re: Leader/Follower Design Pattern Question
    Peter 
    pptaszek at autograf.pl
       
    Mon Aug 13 09:42:43 CDT 2007
    
    
  
Doug,
> 
>> Yes, these two socket handles are in fdset. Leader thread wakes up,
>> poll() indicates that appropriate socket in fdset is "Read Ready".
> 
> BTW, please note that poll() doesn't use fdsets - I assume you're
> using this term loosely, right?
> 
Not exactly, It was just my mistake :-) It should be struct pollfd,
but It is such a long name...
>> But It is not able to activate his 
>> socket handle in fdset, because It's now acquired by leader polling
>> this fdset.
> 
> Ah, now I understand your question.  Basically, there needs to be yet
> another "internal" I/O handle - let's call it the "notify handle" -
> that poll() always waits on in addition to the socket handles that
> correspond to clients.  This notify handle is used to wakeup poll()
> after updating the fdset that keeps track of what events need to be
> listened to.  There's more discussion of how this works in Chapter 3
> and 4 of the C++NPv2 book <www.cs.wustl.edu/~schmidt/ACE/book2/>.  The
> code for doing this is available in ACE in the ACE_Select_Reactor.
> Please take a look at these resources and let me know if you have any
> questions.
> 
Ok, now It is clear...
Thank you very much,
Peter
    
    
More information about the Ace-users
mailing list