程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> Delphi對象池MyObjectPool.pas

Delphi對象池MyObjectPool.pas

編輯:Delphi

對象池一般在服務端使用,所以穩定性是第一的。

歡迎提意見


= 
  ////== /////// <summary>
    ////// </summary>/// <summary>
    ////// </summary>
    /// <summary>
    ////// </summary>
    /// <summary>
    ////// </summary>
     createObject: TObject; 
     Create(pvObjectClass: TClass =  Destroy; /// <summary>
    ////// </summary>
    /// <summary>
    ////// </summary>
    /// <summary>
    ////// </summary>
    /// <summary>
    ////// </summary>
    ///// <summary>
    ////// </summary>
    /// <summary>
    ////// </summary>
     Count: Integer /// <summary>
    ////// </summary>
     MaxNum: Integer  FMaxNum /// <summary>
    ////// </summary>
     Name: String  FName /// <summary>
    ///////// </summary>
     TimeOut: Integer  FTimeOut 


     FUsableList.Count >  
    = PObjectBlock(FUsableList[FUsableList.Count-- TMyObjectPool.Create(pvObjectClass: TClass = 
  ====//= //等待超時信號燈 =  * //= CreateEvent(, True, True, //= CreateEvent(, True, True, =  FObjectClass <>  
  ==


     i :=   FBusyList.Count -  
    = lvObj.FObject = pvObject 
      ==  True 
  
    //////如果當前有1個可用,=  FUsableList.Count >  
      = PObjectBlock(FUsableList[FUsableList.Count--== = 
      
         GetCount >= FMaxNum 
        
          //如果當前有1個可用,//// exception.CreateFmt(= lvObject =    exception.CreateFmt(=== //=//
   (GetCount < FMaxNum)      // (FUsableList.Count > )  //
  
    // 
  
    // FBusyList.Count >  
  
    // 
  
    //= FUsableList.Count +== lvRet = WAIT_OBJECT_ 
  == lvRet <> WAIT_OBJECT_ 
  
     Exception.CreateFmt(.

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved