> If you want not even one failed pull(), that will take some reorganization > of the code to clear the notifier in a different place (this would be easy to > do).
You may be interested in QuickNoteQueue, just checked in. Eddie > >> Since the valid/invalid test is an expensive >> one, what I would like is for the Notifier signal to act like a test >> function, so I only perform the valid/invalid operation if a queue is >> non-empty. Further, in case the queue is not empty but belongs to the set of >> "invalid" queues, I do not want to put the packet back at the head of the >> queue (of which I cannot think of a simple way of doing from within the >> scheduler element). > > More generally, it seems like you should make your valid/invalid check > cheaper. There are many possible ways to do this, including caching old > values of the check and only updating the cache when necessary. > > Eddie > > >> One solution is that I extend the Queue element to include a test function >> and along with the signal check the test function. >> >> Is there a clean way to make the Notifier signal active only when the input >> queue is really non-empty and not a false alarm? >> >> Thank you for your time. I would really appreciate any suggestions or >> thoughts. >> >> Thanks >> Ashish >> _______________________________________________ >> click mailing list >> [email protected] >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
