コード例 #1
0
ファイル: ConnectionPoolFactory.cs プロジェクト: kunalkot/mdo
 public ConnectionPool getPool(AbstractPoolSource source)
 {
     if (source == null)
     {
         throw new ArgumentException("Need to supply pool source before connection pool can be built");
     }
     ConnectionPool pool = new ConnectionPool();
     pool.PoolSource = (ConnectionPoolSource)source;
     Thread poolThread = new Thread(new ThreadStart(pool.run));
     poolThread.Name = "MdwsConnectionPool" + ((ConnectionPoolSource)source).CxnSource.SiteId.Id;
     poolThread.IsBackground = true; // this allows the main process to terminate without the connection pool being forced to clean up - ok?
     poolThread.Start();
     return pool;
 }