Пример #1
0
void Fragment::releaseInstances()
{
	logger::warn("attempt to release Fragment instances\n");
	
	// release any instantiations
	vector<AsscInstance*>::iterator iter;
	_foreach(_instantiations, iter) delete *iter;
	_instantiations.clear();	
	_numInstances = 0;
	_instTests = 0;
}
Пример #2
0
TransportLayer::Stats TransportLayerManager::sessionStats() {
    Stats stats;

    _foreach([&](TransportLayer* tl) {
        Stats s = tl->sessionStats();

        stats.numOpenSessions += s.numOpenSessions;
        stats.numCreatedSessions += s.numCreatedSessions;
        if (std::numeric_limits<size_t>::max() - stats.numAvailableSessions <
            s.numAvailableSessions) {
            stats.numAvailableSessions = std::numeric_limits<size_t>::max();
        } else {
            stats.numAvailableSessions += s.numAvailableSessions;
        }
    });

    return stats;
}
Пример #3
0
void TransportLayerManager::endAllSessions(Session::TagMask tags) {
    _foreach([&tags](TransportLayer* tl) { tl->endAllSessions(tags); });
}
Пример #4
0
void TransportLayerManager::shutdown() {
    _foreach([](TransportLayer* tl) { tl->shutdown(); });
}