Hi,
On Wed, Jul 8, 2009 at 6:48 PM, Graham Dumpleton <[email protected] > wrote: > In case you haven't already found it, ensure you have a read of: > > > http://www.fmc-modeling.org/category/projects/apache/amp/4_3Multitasking_server.html > > > > It may not address the specific question, but certainly will give you > a better overall picture. > > The rest of that book is also worth reading as well. I will read. My doubt started because, first, FIFO is characteristic of Queue and Queue has operations as like ENQUEUE() and DEQUEUQ ( PUSH() and POP() to me means stack-like ). Second, POP() in worker.c, retrieve sockets based on variable NELTS, but if it's queue then why retrieves socket (NELTS-1). For example: Happen many PUSHs(), nothing POPs() and variable NELTS = 10; When I will retrieve a socket then NELTS = 9, but and socket 8, or 7, or 6, or 5 .... ?? Why POP() not recover socket in begin of queue ?? This is my doubt. Thank you Ricardo > > > Graham > > 2009/7/8 ricardo13 <[email protected]>: > > > > Hi, > > > > I'm trying understand worker.c module. > > My doubt is about operation push() and pop(). > > > > Push() add a socket in array fd_queue_t->data and Pop() retrieve a socket > > for processing. > > > > But what's the order of PUSH() ?? It adds in final queue ?? > > And POP() ?? Retrieve a socket only before (elem = > > &queue->data[--queue->nelts];) ?? > > > > Thank you > > Ricardo > > -- > > View this message in context: > http://www.nabble.com/Help-with-worker.c-tp24389140p24389140.html > > Sent from the Apache HTTP Server - Dev mailing list archive at > Nabble.com. > > > > > -- Muito Obrigado Ricardo
