GitHub user neykov opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/771

    Don't leak machines on shutdown

    STOPping an app and then doing a shutdown-and-stop-apps could leak machines 
because the second stop (from the shutdown) can complete faster as it's not 
re-releasing the machines, then unmanage the app and cancel the first stop's 
tasks. Cancelling the tasks will not release the machines properly.
    
    This PR works around the problem in the shutdown code. Double stopping an 
app will still keep the same behaviour.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neykov/incubator-brooklyn wait-apps-shutdown

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/771.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #771
    
----
commit b93c2995f5212c3680df19c90961d242088d3429
Author: Svetoslav Neykov <[email protected]>
Date:   2015-07-23T15:54:30Z

    Graceful exit on REST shutdown call
    
    Instead of calling System.exit, exit the main thread.

commit cad297b318d7f063ade3930e77b1e56e79d50e16
Author: Svetoslav Neykov <[email protected]>
Date:   2015-07-24T20:12:22Z

    Wait apps to stop before shutting down.

commit ce2fd3f29dd639104c1128ba80279478c380b78c
Author: Svetoslav Neykov <[email protected]>
Date:   2015-07-27T13:28:25Z

    Add tests for apps double stop

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to