Just looked in FbConnectionPool.CheckOut()

We have hard loading in our program and it is not clear with behavior of pool 
in case if MaxPoolSize connections already was opened and then closed. Not 
clear with next lines in case this.lifeTime == 0:

        this.CheckMaxPoolSize();

        lock (this.unlocked.SyncRoot)
        {
                newConnection = this.GetConnection();
                if (newConnection != null)
                {
                        return newConnection;
                }
        }

        newConnection = this.Create();  


As I see if already MaxPoolSize connections are in pool and all are in unlocked 
i still will never get new connection.


Maybe this.CheckMaxPoolSize(); should be exactly before creation of new connection object but not before getting of unlocked connection via this.GetConnection()? Or maybe in CheckMaxPoolSize() this.unlocked.Count should be checked but not (this.unlocked.Count + this.locked.Count)?

Or did I misunderstand something?


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to