directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject BaseThreadPool question
Date Tue, 11 Oct 2005 08:09:14 GMT
I noticed in Worker.fetchBuffer that readySessionBuffers is 'cleaned' (removal
of null or empty SessionBuffers) up to the first usable SessionBuffer.

Is there a reason to stop cleaning?

What do you think about separating the cleaning from the selection?

We could first iterate and remove null or empty SessionBuffers, and then call an
electBufferForProcessing method if the set is not empty.

By default, electBufferForProcessing would return the first element.

In my case (cf. mail about prioritary messages), I would overwrite default
behavior and search for prioritary messages.

This seems to me a good refactoring as it separates concerns.

Another approach would be to prevent null/empty SessionBuffer to be in
readySessionBuffers. But I don't know how they reach the set.



View raw message