Hi, that is correct. The timeout is associated with the resource, not the requests, so that would be more logical. I'll try that too.
thanks Neeraj ================================================== arguments are a "win win" situations. Each party goes away thinking they won. --- On Sun, 12/18/11, Jonathan Neuschäfer <[email protected]> wrote: > From: Jonathan Neuschäfer <[email protected]> > Subject: Re: [timers] - triggering at the same time > To: "Neeraj Rai" <[email protected]> > Cc: "Marc Lehmann" <[email protected]>, [email protected] > Date: Sunday, December 18, 2011, 2:06 PM > On Sun, Dec 18, 2011 at 10:32:50AM > -0800, Neeraj Rai wrote: > > > otoh, why do you need the strict timer ordering? > maybe your > > > goal can be achieved without it? > > We have certain resources that become available at > certain times- the > > times are controlled by config and subject to change. > > When users come in looking to use the resource, and > the resource is not > > available, the request is queued to trigger at the > specic time (cfg based) > > When the time arrives, we want to give the resourse to > users in the order > > they requested. > > To me it sounds like you could have one timer that fires > when this > resource becomes available, and some kind of queue that > tracks the users > who requested it. Some pseudo-code: > > on request: > if the resource is available and the request > queue is empty: > serve the user > else: > add user to the queue > > on resource timeout: > while resource is available: > get a user from the list, > serve it > > > HTH, > Jonathan Neuschäfer > _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
