// Efficient way of checking whether another thread is already processing messages from 'sender'.
// If that's the case, we return immediately and let the existing thread process our message
// (https://jira.jboss.org/jira/browse/JGRP-829). Benefit: fewer threads blocked on the same lock, these threads
// can be returned to the thread pool
final AtomicBoolean processing=win.getProcessing();
if(!processing.compareAndSet(false, true)) {
return;
}
boolean remove_msgs=discard_delivered_msgs && !loopback;
boolean released_processing=false;