In SemanticState.cpp:384
bool SemanticStateConsumerImpl::filter(const Message& msg)
{
return !selector || selector->filter(msg);
}
bool SemanticStateConsumerImpl::accept(const Message& msg)
{
// TODO aconway 2009-06-08: if we have byte & message credit but
// checkCredit fails because the message is to big, we should
// remain on queue's listener list for possible smaller messages
// in future.
//
blocked = !(filter(msg) && checkCredit(msg));
return !blocked;
}
-- Note that accept() itself uses filter().
However as far as I can tell the only use for this accept() is currently
in Queue.cpp:386
...
if (c->filter(*msg)) {
if (c->accept(*msg)) {
if (c->preAcquires()) {
...
So it seems that accept() can only be called when filter already
returned true, so trying it again seems unnecessary.
Did I miss some important point here? I'd like to get rid of unnecessary
filter() operations as if a selector is attached they could be costly.
Andrew
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]