library/src/databases/mysql/BP-DBMySQLConnectionPooling.cc
// Releases a MySQL connection pool entry, and marks it available for another thread to use.
Releases a MySQL connection pool entry, and marks it available for another thread to use.
Releases a MySQL connection pool entry and marks it available for another thread to use .
BP_ERROR_T BP_MySQLConnectionPoolMakeAvailableAndUnlock
(
		P_BP_MYSQL_CONN_POOL pool,
		P_BP_MYSQL_CONNECTION_POOL_ENTRY entry
)
{
	if(!pool)
		return ERR_FAILURE;
	if(!entry)
		return ERR_FAILURE;
	entry->in_use = BP_FALSE;
	pool->entries_in_use--;
	sem_post(&entry->lock);
	return ERR_SUCCESS;
}
BP_ERROR_T BP_MySQLConnectionPoolMakeAvailableAndUnlock ( P_BP_MYSQL_CONN_POOL pool , P_BP_MYSQL_CONNECTION_POOL_ENTRY entry ) { if ( ! pool ) return ERR_FAILURE ; if ( ! entry ) return ERR_FAILURE ; entry -> in_use = BP_FALSE ; pool -> entries_in_use -- ; sem_post ( & entry -> lock ) ; return ERR_SUCCESS ; }
Releases a MySQL connection pool entry, and marks it available for another thread to use.
Releases a MySQL connection pool entry and marks it available for another thread to use .
// ensure we have a pointer to our pool // check entry // set the in use flag to false // decrease the number of entries currently in use // unlock entry (doesn't need a prior wait, as it's already waited on) // return indicating success