hxp
2025-12-12 9686b06e1a3c883f14ecb4e5dd44a4e4c8456ed3
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
52
:ic@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õ|||ŽS||jkr/|j|dƒn|j|}|dri|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ªdSt|ƒ}||jkr#dS||jkr6dS|jj|ƒt|gƒ}z=t|dƒrt|jƒn|j||ƒ|j|ƒWd|jj    |ƒXdS(s"ÊͷŶÔÏ󲢵ݹéÊÍ·ÅÆäǶÌ×¶ÔÏ󳨶ÔÏóNt    onRelease(
RRRtaddRthasattrRt_recursive_releaset_return_to_pooltdiscard(RRRtvisited((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pytreleasePs  cCs£xœ|j|ƒD]‹}yt|ƒ}Wntk
r<qnX||krOqn|j|ƒ||jkr‹|j||ƒ|j|ƒq|j||ƒqWdS(s"µÝ¹éÊÍ·ÅǶÌ×¶ÔÏ󳨶ÔÏó£¨Éî¶ÈÓÅÏÈ£©N(t_get_referencesRt    TypeErrorRRRR(RRR!treftref_id((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyRms   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__(ttypeRtdirt
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    (RR0RR(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(NRPRR((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-REtlenRtmaxtsortR?R R tformat(Rt
statusListt max_name_lentmax_created_lent max_free_lentmax_active_lenRRt
class_nameRPRQRRt header_formatt
row_formatt    separatorRS((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt pool_statusþs^
       
    ( R t
__module__RRRR"RR#R/RRORh(((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
GetPoolMgrGs
         cCsdS(sÿ·ÖÖÓÖ´ÐУ¬Êä³ö¶ÔÏó³Ø×´Ì¬N((tcurTime((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pytOnMinuteOs(R RjR2RGtobjectRRmRo(((s_D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\ObjPool.pyt<module>s    ÿ/