You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2013/11/18 17:09:21 UTC

[jira] [Created] (UIMA-3433) UIMA-AS cleanup of semaphore testing wrong thing

Marshall Schor created UIMA-3433:
------------------------------------

             Summary: UIMA-AS cleanup of semaphore testing wrong thing
                 Key: UIMA-3433
                 URL: https://issues.apache.org/jira/browse/UIMA-3433
             Project: UIMA
          Issue Type: Bug
          Components: Async Scaleout
    Affects Versions: 2.4.2AS
            Reporter: Marshall Schor
            Assignee: Marshall Schor
            Priority: Minor


There is a test to clear a semaphore in uima-as as part of the stop method, which does 
{code:borderStyle=solid}
	// release all permits
	  if ( semaphore != null ) {
		  while ( semaphore.availablePermits() > 0) {
		  		semaphore.release();
	  	  }
	  }
{code}

Stepping through this shows that each call to release() increases (not decreases) the number of availablePermits.

Replace with drainPermits(), which appears to be the intent.




--
This message was sent by Atlassian JIRA
(v6.1#6144)