hxp
2025-08-25 b7154533a3f9db72d0dfc28f21b19ee4aadf1b51
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Ù(“hc@s\ddlZddlZddlZddlZdefd„ƒYZd„Zd„ZdS(iÿÿÿÿNtRecursiveObjectPoolManagercBseeZd„Zdd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d    „Z
d
„Z RS( cCs"i|_i|_tƒ|_dS(N(t_poolst_obj_id_to_pooltsett
_releasing(tself((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt__init__s        i
cCsn||jkr'tjd|jƒdStjd|j|fƒi|d6gd6gd6dd6|j|<|S(    slΪָ¶¨Àà´´½¨¶ÔÏó³Ø
        :param obj_class: Òª¹ÜÀíµÄ¶ÔÏóÀà
        :param max_size: ¶ÔÏó³Ø×î´óÈÝÁ¿
        sPool for %s already existsNscreate_pool %s, max_size=%stmax_sizet    free_listt active_listit created_count(Rt    GameWorldtLogt__name__(Rt    obj_classR((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt create_pool!scOsè||jkr"|j|dƒn|j|}|dr\|djƒ}|j||Žnw|ddks€|d|dkr»|||Ž}|dcd7<t|ƒ}||j|<ntjd|jƒdS|dj
|ƒ|S(    s»ñÈ¡¶ÔÏ󲢼ǼÆäËùÊô³ØiRRR
is%s pool exhaustedR    N( RRtpopRtidRR tErrLogR tNonetappend(RRtargstkwargstpooltobjtobj_id((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pytacquire3s 
$ cCsŠt|ƒ}||jkrdS||jkr2dS|jj|ƒt|gƒ}z!|j||ƒ|j|ƒWd|jj|ƒXdS(s"ÊͷŶÔÏ󲢵ݹéÊÍ·ÅÆäǶÌ×¶ÔÏ󳨶ÔÏóN(RRRtaddRt_recursive_releaset_return_to_pooltdiscard(RRRtvisited((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pytreleaseOs cCs£xœ|j|ƒD]‹}yt|ƒ}Wntk
r<qnX||krOqn|j|ƒ||jkr‹|j||ƒ|j|ƒq|j||ƒqWdS(s"µÝ¹éÊÍ·ÅǶÌ×¶ÔÏ󳨶ÔÏó£¨Éî¶ÈÓÅÏÈ£©N(t_get_referencesRt    TypeErrorRRRR(RRRtreftref_id((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyRhs   c Csëg}t|ƒ}y‹t|dƒrœxut|ƒD]d}|jdƒrLq1nyt||ƒ}Wntk
ruq1nX|j|ƒs1|j|ƒq1q1WnWntk
r°nX|tt    t
t j fkrÿxš|D]%}|j|ƒsÓ|j|ƒqÓqÓWnj|t krix[|jƒD]J\}}|j|ƒsC|j|ƒn|j|ƒs|j|ƒqqWnyjt|dƒrÒxT|jD]F}    t||    ƒr…t||    ƒ}
|j|
ƒsË|j|
ƒqËq…q…WnWntk
rænX|S(s,°²È«»ñÈ¡¶ÔÏóµÄËùÓÐÖ±½ÓÒýÓã¬Ö§³Ö¸´ÔÓÊý¾Ý½á¹¹t__dict__t__t    __slots__(ttypethasattrtdirt
startswithtgetattrt    Exceptiont_is_basic_typeRtlistttupleRt collectionstdequetdictt    iteritemsR'( RRtrefstobj_typetattrt
attr_valuetitemtkeytvaluet    slot_namet
slot_value((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyR!€sF      cCsz|dkrtSt|ttttttfƒr5tSt|t    j
t    j t    j fƒrZtSt|t    j tfƒrvtStS(s$ÅжÏÖµÊÇ·ñΪ»ù±¾ÀàÐÍ£¬²»ÐèÒªµÝ¹é´¦ÀíN(RtTruet
isinstancetinttlongtfloattbooltstrtunicodettypest FunctionTypet
MethodTypet
ModuleTypetBuiltinFunctionTypeR(tFalse(RR;((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyR.±s !!cCsžt|ƒ}||jkrdS|j|}||jkr?dS|j|}||dkršy|dj|ƒWntk
r…dSX|dj|ƒndS(s½«¶ÔÏó¹é»¹µ½ÆäËùÊô³ØNR    R(RRRtremovet
ValueErrorR(RRRRR((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyR½s    
cCsy||jkrdS|j|}xHt|d|dƒD].}t|ƒ}||jkr9|j|=q9q9W|j|=dS(sÏú»ÙÖ¸¶¨ÀàµÄ¶ÔÏó³ØNRR    (RR/RR(RRRRR((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt destroy_poolâs      cCsEg}d}d}d}d}xî|jjƒD]Ý\}}t|dt|ƒƒ}|d}    t|dƒ}
t|dƒ} |ji|d6|    d6|
d6| d    6ƒt|t|ƒƒ}t|tt|    ƒƒƒ}t|tt|
ƒƒƒ}t|tt| ƒƒƒ}q.Wt|d
ƒ}t|d ƒ}t|d ƒ}t|d ƒ}|jd d „dtƒd} d} t    j
dƒt    j
| j ddddd|d|d|d|ƒƒdj d|d|d|d|ƒ}t    j
|ƒxU|D]M}t    j
| j |d|d|d|d    d|d|d|d|ƒƒqðWdS(sÊä³öËùÓжÔÏ󳨵Ä״̬ÐÅÏ¢iR R
RR    RtcreatedtfreetactiveiiR:cSs|d|dfS(NRORQ((ts((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt<lambda>streversesR| {:<{name_width}} | {:>{created_width}} | {:>{free_width}} | {:>{active_width}} |s----- ¶ÔÏó³Ø×´Ì¬ -----s
¶ÔÏó³ØÃû³Æs×ÜÊýs¿ÕÏÐs»îÔ¾t
name_widtht created_widtht
free_widtht active_widths+-{}-+-{}-+-{}-+-{}-+s-N( RtitemsR,RDtlenRtmaxtsortR>R R tformat(Rt
statusListt max_name_lentmax_created_lent max_free_lentmax_active_lenRRt
class_nameRORPRQt header_formatt
row_formatt    separatorRR((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt pool_statusùs^
       
    ( R t
__module__RRRR RR!R.RRNRg(((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyRs                     1         %    cCs(tj}|s$tƒ}|t_n|S(s»ñȡָ¶¨Àà´´½¨¶ÔÏó³Ø(t
PyGameDatat g_objPoolMgrR(tpoolMgr((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt
GetPoolMgrBs
         cCstƒjƒdS(sÿ·ÖÖÓÖ´ÐУ¬Êä³ö¶ÔÏó³Ø×´Ì¬N(RlRg(((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pytOnMinuteJs (R RiR1RFtobjectRRlRm(((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt<module>s    ÿ*