eISrSS/rSSKJr SSKrSSKrSSKrSSKrSSKrSSK r \RS:XaSSK r Sr OSSK r Sr S S KJr \R \R"-rS r\ (aS rOS rSr"SS5rSr"SS5rg)zProvides shared memory for direct access across processes. The API of this package is currently provisional. Refer to the documentation for details. SharedMemory ShareableList)partialNntFT)resource_trackerz/psm_wnsm_c[[[5- S-nUS:dS5e[[R"U5-n[U5[::deU$)z6Create a random filename for the shared memory object.z_SHM_NAME_PREFIX too long)_SHM_SAFE_NAME_LENGTHlen_SHM_NAME_PREFIXsecrets token_hex)nbytesnames C/opt/imh/python3.13/lib/python3.13/multiprocessing/shared_memory.py_make_filenamer(sX$c*:&;; AF Q;333; g//7 7D t9- -- - Kc\rSrSrSrSrSrSrSr\ Rr Sr \ (aSOSrSrSSS.S jjrS rS rS r\S 5r\S5r\S5rSrSrSrg)r2aCreates a new shared memory block or attaches to an existing shared memory block. Every shared memory block is assigned a unique name. This enables one process to create a shared memory block with a particular name so that a different process can attach to that same shared memory block using that same name. As a resource for sharing data across processes, shared memory blocks may outlive the original process that created them. When one process no longer needs access to a shared memory block that might still be needed by other processes, the close() method should be called. When a shared memory block is no longer needed by any process, the unlink() method should be called to ensure proper cleanup.NiTF)trackcUS:d [S5eU(a-[[R-UlUS:Xa [S5eUc-UR[R -(d [S5eX@l[(GaHUcB[5n[R"UURURS9Ul XlOMUR(aSU-OUn[R"UURURS9Ul XlU(a(U(a![R "URU5 [R""UR5nUR$n[&R&"URU5UlUR (a![.R0"URS5 GOU(Ga'Uc [5OUn[2R4"[2R6[2R8[2R:US- S -US -U5n[2R<"5nU[2R>:XahUbL[[@RB[RD"[@RB5U[2R>5e[2RF"U5 M[&R&"S X6S 9Ul[2RF"U5 X`lOXl[2RH"[2RJS U5n[2RL"U[2RJSSS5n [2RF"U5 [2RN"U 5n[2RP"U 5 [&R&"S X1S 9UlX0l)[UUR(5Ul+g![a GMUf=f![*a UR-5 ef=f![2RF"U5 f=f![2RF"U5 f=f![2RP"U 5 f=f) Nrz!'size' must be a positive integerz4'size' must be a positive number different from zeroz&'name' can only be None if create=True)mode/ shared_memory lr)tagnameF), ValueError_O_CREXosO_RDWR_flagsO_EXCL_track _USE_POSIXr _posixshmemshm_open_mode_fdFileExistsError_name_prepend_leading_slash ftruncatefstatst_sizemmap_mmapOSErrorunlinkrregister_winapiCreateFileMappingINVALID_HANDLE_VALUENULLPAGE_READWRITE GetLastErrorERROR_ALREADY_EXISTSerrnoEEXISTstrerror CloseHandleOpenFileMapping FILE_MAP_READ MapViewOfFileVirtualQuerySizeUnmapViewOfFile_size memoryview_buf) selfrcreatesizerstats temp_nameh_maplast_error_codep_bufs r__init__SharedMemory.__init__LsPqy@A A !BII-DKqy !WXX < bii 7EF F :|)+D!#.#7#7  KK!%$"&J%)%@%@sTzd&//KK "  dLL40*}}!YYtxx6 {{ ))$**oF 48L 0dI$5544 ..z1z)! E3*1*>*>*@*g.J.JJ#/&5$)LL$&KK $=$($+$@$@ '"!"!) ++E2&*YYr4%K ++E2!*J"  //)) /#11-- E''.3"33E:D++E2!YYr4>  tzz* k+! !$   J ++E2,''.++E2sJ/OBO$7A8PP,(P+P9 O! O!$PPP69QcFUR5 g![a gf=fN)closer5rKs r__del__SharedMemory.__del__s"  JJL   s   cLURURSUR44$)NF) __class__rrMrXs r __reduce__SharedMemory.__reduce__s) NN     rcjURRSUR<SURS3$)N(z, size=))r\__name__rrMrXs r__repr__SharedMemory.__repr__s...))*!DII= {!LLrcUR$)z4A memoryview of contents of the shared memory block.)rJrXs rbufSharedMemory.bufsyyrcURn[(a@UR(a/URRS5(aURSSnU$)z4Unique name that identifies the shared memory block.rrN)r.r(r/ startswith)rK reported_names rrSharedMemory.namesD :$55zz$$S)) $ 12 rcUR$)zSize in bytes.)rHrXs rrMSharedMemory.sizeszzrcDURb!URR5 SUlURb!URR5 SUl[(a9UR S:a([ R"UR 5 SUlggg)zcCloses access to the shared memory from this instance but does not destroy the shared memory block.Nrr)rJreleaser4rWr(r,r#rXs rrWSharedMemory.closess 99 II   DI :: ! JJ   DJ :$((a- HHTXX DH(:rc[(afUR(aT[R"UR5 UR(a"[ R "URS5 gggg)aRequests that the underlying shared memory block be destroyed. Unlink should be called once (and only once) across all handles which have access to the shared memory block, even if these handles belong to different processes. Closing and unlinking may happen in any order, but trying to access data inside a shared memory block after unlinking may result in memory errors, depending on platform. This method has no effect on Windows, where the only way to delete a shared memory block is to close all handles.rN)r(r.r) shm_unlinkr'r unregisterrXs rr6SharedMemory.unlinksH :$**  " "4:: .{{ ++DJJH%:r)rJr,r%r4r.rHr')NFr)rb __module__ __qualname____firstlineno____doc__r.r,r4rJr#r$r%r+r(r/r'rSrYr]rcpropertyrfrrMrWr6__static_attributes__rrrr2s B E C E D YYF E%/TU Fm+m+^  M Irutf8c T\rSrSrSr\S\S\S\S\ SSRS0r S r S S S S S.r \S5rS$SS.SjjrSrSrSrSrSrSrSrSr\S5r\S5r\S5r\S5r\S5r\S5r\S 5r S!r!S"r"\#"\$RJ5r&S#r'g)%riaqPattern for a mutable list-like object shareable via a shared memory block. It differs from the built-in list type in that these lists can not change their overall length (i.e. no append, insert, etc.) Because values are packed into a memoryview as bytes, the struct packing format for any storable value must require no more than 8 characters to describe its format.qdzxxxxxxx?z%dsNzxxxxxx?xcU$rVr{values rShareableList. srcJURS5R[5$N)rstripdecode _encodingrs rrr!sg.55i@rc$URS5$r)rrs rrr"s g.rcgrVr{)_values rrr#s$r)rrr c[U[[SR45(dg[U[5(ag[U[5(agg)zUsed in concert with _back_transforms_mapping to convert values into the appropriate Python objects when retrieving them from the list as well as when storing them.Nrrr r) isinstancestrbytesr\rs r_extract_recreation_code&ShareableList._extract_recreation_code&sB %#udnn!=>> s # # u % %rrc^ UbUGbU=(d SnUVs/sHxn[U[[45(dUR[ U5OAUR[ U5UR [ U5UR -S--4-PMz nn[ U5Ul[SU55UR:XdeSnS/Ul UHCnXVSS:wa UR O [USS5- nURRU5 ME UVs/sHo0RU5PM nn[R"SUR-SR!U5-UR"-UR$-5n['US US 9UlO['U5UlUGb2[*m [R,"SUR-UR(R.SUR/URQ76 [R,"SR!W5UR(R.UR0/U 4S jU5Q76 [R,"UR"UR(R.UR2/U 4S jU5Q76 [R,"UR$UR(R.UR4/WQ76 g[ U5Ul[7[R8"URUR(R.S 55Ul gs snfs snf)Nr{rc3># UHn[U5S:*v M g7f)rN)r).0fmts r )ShareableList.__init__..@s9s3x1}srrsr~T)rLrMc3t># UH-n[U[5(aURT5OUv M/ g7frV)rrencoderv_encs rrrds*Px!Jq#$6$6!((4.A=xs58c3D># UHoRT5v M g7frV)rrs rrrjs3(Q((4..(s r)rrr_types_mappingtype _alignmentr _list_lensum_allocated_offsetsintappendrstructcalcsize_format_size_metainfojoin_format_packing_metainfo_format_back_transform_codesrshmr pack_intorf_offset_data_start_offset_packing_formats_offset_back_transform_codeslist unpack_from) rKsequenceritem_formatsoffsetr_recreation_codesrequested_sizers @rrSShareableList.__init__4s <8/~2H%  %D &dS%L99##DJ/,,T$Z83t9+G!+KL< % !]DN999T^^K KKF()cD #W^$//S"XN''..v6 AI!@H--d3 !$__d000!"--.112N$DNKDH#D)DH  D   d000    ))     ! '' QxP     -- ,, 4(3     11 11 $  !YDN&*""..HHLL'D #}$!s A?L9"L>cPUS:aUO XR-nXR:dURS:a [S5e[R"SURR UR US--5SnURS5nUR[5nU$)z>Gets the packing format for a single value stored in the list.r Requested position out of range.8srr) r IndexErrorrrrrfrrrr)rKpositionrr fmt_as_strs r_get_packing_format!ShareableList._get_packing_format}s'1}8(^^2K  &DNNQ,>?@ @     HHLL  ( (8a< 7    hhwZZ * rcXR:dURS:a [S5e[R"SURR UR U-5SnURUnU$)z9Gets the back transformation function for a single value.rrb)rrrrrrfr_back_transforms_mapping)rKrtransform_codetransform_functions r_get_back_transform!ShareableList._get_back_transformst  &DNNQ,>?@ @++  HHLL  - - 8    "::>J!!rcXR:dURS:a [S5e[R"SURR UR US--UR[55 URU5n[R"SURR URU-U5 g)znSets the packing format and back transformation code for a single value in the list at the specified position.rrrrrN) rrrrrrfrrrrr)rKrrrrs r!_set_packing_format_and_transform/ShareableList._set_packing_format_and_transforms  &DNNQ,>?@ @  HHLL  ( (8a< 7   i (  66u=  HHLL  - - 8   rcJUS:aUO XR-nURURU-n[R"UR U5UR RU5unURU5nU"U5nU$![a [S5ef=f)Nrzindex out of range) rrrrrrrrfrr)rKrrrback_transforms r __getitem__ShareableList.__getitem__s'1}8(^^2K 3,,t/F/Fx/PPF%%((2 DQ11(; 1   312 2 3s AB B"cUS:aUO XR-nURUnURU-nURU5n[ U[ [45(dUR[U5nUnO~URUS-U- n[ U[ 5(aUR[5OUn[U5U:a [S5eUSS:XaUnOUR[ U4-nURUUU5 [R "X`R"R$XG5 g![a [ S5ef=f)Nrzassignment index out of rangerz(bytes/str item exceeds available storagerr)rrrrrrrrrrrrrr!rrrrrf) rKrr item_offsetrcurrent_format new_format encoded_valueallocated_lengths r __setitem__ShareableList.__setitem__sO'1}8(^^2K >11(;K,,{:F!55h?N%#u..,,T%[9J!M#66x!|D{R !+5# 6 6#\\)4<= = >s /D::EcV[URURRS9S4$)Nrr{)rr\rrrXs rr]ShareableList.__reduce__s t~~DHHMM:B>>rc`[R"SURRS5S$)Nr~r)rrrrfrXs r__len__ShareableList.__len__s$!!#txx||Q7::rc|URRS[U5SURR<S3$)Nr`z, name=ra)r\rbrrrrXs rrcShareableList.__repr__s3..))*!DJOqQQrc`^SRU4Sj[TR555$)z=The struct packing format used by all currently stored items.rc3F># UHnTRU5v M g7frV)r)rirKs rr'ShareableList.format..s# 1FAD $ $Q ' '1Fs!)rrangerrXs`rformatShareableList.formats,ww 16t~~1F   rc&SURS--$)z>The struct packing format used for the items' storage offsets.r~rrrXs rr#ShareableList._format_size_metainfosdnnq())rc SUR-$)z>The struct packing format used for the items' packing formats.rrrXs rr&ShareableList._format_packing_metainfosdnn$$rc SUR-$)z>The struct packing format used for the items' back transforms.rrrXs rr*ShareableList._format_back_transform_codessT^^##rc&URS-S-$)Nr rrrXs rr ShareableList._offset_data_starts"a''rc:URURS-$)Nr)rrrXs rr%ShareableList._offset_packing_formats s&&)@)@)DDDrc:URURS--$)Nr)rrrXs rr*ShareableList._offset_back_transform_codes s++dnnq.@@@rc.^[U4SjU55$)zCL.count(value) -> integer -- return number of occurrences of value.c3.># UH nTU:Hv M g7frVr{)rentryrs rr&ShareableList.count..s4te5E>ts)r)rKrs `rcountShareableList.counts4t444rcZ[U5Hup#X:XdM Us $ [U<S35e)zhL.index(value) -> integer -- return first index of value. Raises ValueError if the value is not present.z not in this container) enumerater!)rKrrrs rindexShareableList.indexs3 )OH~ /y(>?@ @r)rrrrV)(rbrurvrwrxrfloatboolrrr\rrr staticmethodrrSrrrrrr]rrcryrrrrrrrrr classmethodtypes GenericAlias__class_getitem__rzr{rrrrsI*& S s j U u  NJ  @ .     GdGR " ,"JB?;R  **%%$$(( EEAA5 A$E$6$67r)rx__all__ functoolsrr3r#r?rrrrr8r(r)rrO_CREATr&r"r rrrrrr{rrrs O -  77d?JJ **ryy LILI^  ]8]8r