[jboss-jira] [JBoss JIRA] Closed: (JBRULES-2603) WorkingMemory.executeQueuedActions() is not properly handling reentrant calls

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Wed Jul 28 10:39:33 EDT 2010


     [ https://jira.jboss.org/browse/JBRULES-2603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edson Tirelli closed JBRULES-2603.
----------------------------------



> WorkingMemory.executeQueuedActions() is not properly handling reentrant calls
> -----------------------------------------------------------------------------
>
>                 Key: JBRULES-2603
>                 URL: https://jira.jboss.org/browse/JBRULES-2603
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.1.0.CR1
>            Reporter: Edson Tirelli
>            Assignee: Edson Tirelli
>             Fix For: 5.1.0.FINAL
>
>
> The code looks like:
>     public void executeQueuedActions() {
>         try {
>             startOperation();
>             if( evaluatingActionQueue.compareAndSet( false, true ) ) {
>                 if ( !this.actionQueue.isEmpty() ) {
>                     WorkingMemoryAction action = null;
>                     while ( (action = actionQueue.poll()) != null ) {
>                         try {
>                             action.execute( this );
>                         } catch ( Exception e ) {
>                             throw new RuntimeDroolsException( "Unexpected exception executing action " + action.toString(),
>                                                               e );
>                         }
>                     }
>                 }
>             }
>         } finally {
>             evaluatingActionQueue.compareAndSet( true, false );
>             endOperation();
>         }
>     }
> What is obviously wrong, since the line 
> evaluatingActionQueue.compareAndSet( true, false );
> should be inside the "if" that sets the variable to true.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list