/** * Return an activity to the activity pool. * * @param activityObject * The released activity. */ void ActivityManager::activityEnded(RexxActivity *activityObject) { // START OF CRITICAL SECTION { ResourceSection lock("ActivityManager::activityEnded", 0); // this is a critical section // and also remove from the global list allActivities->removeItem((RexxObject *)activityObject); // cleanup any system resources this activity might own activityObject->cleanupActivityResources(); /* Are we terminating? */ if (processTerminating && allActivities->items() == 0) { // notify any waiters that we're clear postTermination(); } } }
/** * Return an activity to the activity pool. * * @param activityObject * The released activity. */ void ActivityManager::activityEnded(Activity *activityObject) { // START OF CRITICAL SECTION { ResourceSection lock; // this is a critical section // and also remove from the global list allActivities->removeItem(activityObject); // cleanup any system resources this activity might own activityObject->cleanupActivityResources(); // did we just release the last activity during a shutdown? The shutdown // can now complete. if (processTerminating && allActivities->isEmpty()) { // notify any waiters that we're clear postTermination(); } } }