You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (Created) (JIRA)" <ji...@apache.org> on 2011/12/15 12:02:30 UTC

[jira] [Created] (POOL-206) GOP/GKOP close() - incorrect behaviour with evict() ?

GOP/GKOP close() - incorrect behaviour with evict() ?
-----------------------------------------------------

                 Key: POOL-206
                 URL: https://issues.apache.org/jira/browse/POOL-206
             Project: Commons Pool
          Issue Type: Bug
            Reporter: Sebb


GOP/GKOP close() methods close the pool before stopping the evictor; that seems wrong.

The evict() method calls assertOpen() so the evictor thread should be stopped before closing the pool.

Also, the evictor thread should probably be allowed to complete if currently active.

Not sure about calling clear() before the evictor is cancelled; should perhaps be run afterwards?


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (POOL-206) GOP/GKOP close() - incorrect behaviour with evict() ?

Posted by "Mark Thomas (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Thomas resolved POOL-206.
------------------------------

    Resolution: Fixed

The evictor is now stopped before closing the pool.

Marking the pool as closed while the evictor is running won't cause any harm.

Calling clear() in close should cause the evict() method it exit and the evictor thread to terminate as there will no no idle objects to evict.

                
> GOP/GKOP close() - incorrect behaviour with evict() ?
> -----------------------------------------------------
>
>                 Key: POOL-206
>                 URL: https://issues.apache.org/jira/browse/POOL-206
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sebb
>
> GOP/GKOP close() methods close the pool before stopping the evictor; that seems wrong.
> The evict() method calls assertOpen() so the evictor thread should be stopped before closing the pool.
> Also, the evictor thread should probably be allowed to complete if currently active.
> Not sure about calling clear() before the evictor is cancelled; should perhaps be run afterwards?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira