MCPcopy Create free account
hub / github.com/MapServer/MapServer / msConnPoolCloseUnreferenced

Function msConnPoolCloseUnreferenced

mappool.c:452–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450/************************************************************************/
451
452void msConnPoolCloseUnreferenced()
453
454{
455 int i;
456
457 /* this really needs to be commented out before commiting. */
458 /* msDebug( "msConnPoolCloseUnreferenced()\n" ); */
459
460 msAcquireLock( TLOCK_POOL );
461 for( i = connectionCount - 1; i >= 0; i-- )
462 {
463 connectionObj *conn = connections + i;
464
465 if( conn->ref_count == 0 )
466 {
467 /* for now we don't assume the locks are re-entrant, so release */
468 /* it so msConnPoolClose() can get it. */
469 msConnPoolClose( i );
470 }
471 }
472 msReleaseLock( TLOCK_POOL );
473}
474
475/************************************************************************/
476/* msConnPoolFinalCleanup() */

Callers

nothing calls this directly

Calls 3

msAcquireLockFunction · 0.85
msConnPoolCloseFunction · 0.85
msReleaseLockFunction · 0.85

Tested by

no test coverage detected