403Webshell
Server IP : 74.208.236.16  /  Your IP : 216.73.217.15
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : u102440577 ( 7172810)
PHP Version : 8.4.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/python3/dist-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/python3/dist-packages/mercurial/__pycache__/worker.cpython-313.pyc
�

6�h�=���SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
Jr SSKJ
r
JrJrJr \	R""SS\SS	9 S
rSrSr\R,(a\R.S
:wd\R0(aSr\R0rOSrSrSSjrSSjrSSjrSrSSjr\R0(a\r O\r \r!Sr"g)�)�annotationsN�)�_)�encoding�error�pycompat�scmutil�ignorez_This process \(pid=\d+\) is multi-threaded, use of fork\(\) may lead to deadlocks in the child.zmercurial.worker)�message�category�modulec��[[R"S55nUS:�aU$[[
RS5nUS:�aU$g![[4a N9f=f![[4a gf=f)z-try to count the number of CPUs on the system�SC_NPROCESSORS_ONLNrsNUMBER_OF_PROCESSORSr)�int�os�sysconf�AttributeError�
ValueErrorr�environ�KeyError)�ns �2/usr/lib/python3/dist-packages/mercurial/worker.py�	countcpusr(s���
���
�
�0�1�2���q�5��H��
��� � �!8�9�:���q�5��H��

��
�J�'�
��
��
�j�!�
���
�s"�&A�#A'�A$�#A$�'A:�9A:c���URSS5nU(a[U5nUS:�aU$[
[[5S5S5$![a  [R"[S55ef=f)N�workersnumcpusrs!number of cpus must be an integer�� )	�configrrr�Abortr�min�maxr)�ui�srs   r�_numworkersr$>su��
�	�	�)�Z�(�A��	G��A��A��A�v�����s�9�;��"�B�'�'���	G��+�+�a� D�E�F�F�	G�s�A
�
*A7c�X�[R"5[R"5:H$�N)�	threading�current_thread�main_thread��r�ismainthreadr,Js���#�#�%��)>�)>�)@�@�@r+sOpenVMSg{�G�z�?gꌠ9Y>)FFc�r�U(d[(agX-n[U5nU[U-XE---
nUS:�$)zatry to determine whether the benefit of multiple processes can
outweigh the cost of starting themFg333333�?)�_DISALLOW_THREAD_UNSAFEr$�
_STARTUP_COST)r"�	costperop�nops�
threadsafe�linear�workers�benefits       r�
worthwhiler6[sB���1�1��
�
�F��"�o�G��
��/�&�2B�B�C�G��d�?�r+c	���URSS5nU(a[[La[5(dSnU(a$[	X[U5US9(a[XX4XWS9$U"X44-6$)a�run a function, possibly in parallel in multiple worker
processes.

returns a progress iterator

costperarg - cost of a single task

func - function to run. It is expected to return a progress iterator.

staticargs - arguments to pass to every invocation of the function

args - arguments to split into chunks, to pass to individual
workers

hasretval - when True, func and the current function return an progress
iterator then a dict (encoded as an iterator that yield many (False, ..)
then a (True, dict)). The dicts are joined in some arbitrary order, so
overlapping keys are a bad idea.

threadsafe - whether work items are thread safe and can be executed using
a thread-based worker. Should be disabled for CPU heavy tasks that don't
release the GIL.

prefork - a parameterless Callable that is invoked prior to forking the
process.  fork() is only used on non-Windows platforms, but is also not
called on POSIX platforms if the work amount doesn't warrant a worker.
rsenabledF)r2)�prefork)�
configbool�_platformworker�_posixworkerr,r6�len)	r"�
costperarg�func�
staticargs�args�	hasretvalr2r8�enableds	         r�workerrChsd��J�m�m�I�z�2�G��?�l�2�<�>�>����:�b�c�$�i�J�O���j�	�
�	
���g�%�&�&r+c	#�	^^^^^^^^^^^^^ ^!# �[U5n[R"[R5m[R"[R[R5 [5S/smmUU4SjmSUU4Sjjm UUU 4Sjn[R"[RU5mUR5 [R"5n/m0n	U(aU"5 [U[U[U555GHm[R"5umm!TRTT!45 Sn
[R"5nUS:Xak[R"[RT5 [R"[RT5 UUUUUU!4Sjn[ R""X5n
[R"5U:wa+UR5 [R."U
S	-5 OTR1W5 GM [2R4"5mTHRumm![R6"T!5 TR9[R:"TS
S5[2R<5 MT SmU4S
jnUUUUU 4Sjn[T5nUS:�agTR?5HKunnU"UR@5H.nU(a US(aU	RCUS5 M*Uv� M0 MM US:�aMgU"5nU(aGUS:a+[RH"[R"5U*5 [JRL"U5eU(aSU	4v� gg! [R"5U:Xae[$R&"5Sn
[)U
[*5(+nUR-US9 GN=f! GN�=f![R."U
S	-5 f=f![R"5U:waQUR5 O! O=f[R."U
S	-5 f![R."U
S	-5 f=ff=f![Da? TRGUR@5 UR@R75 US-nGM�f=f! T"5 U"5 e=f7f)Nrc��>�[R"[RT5 TH)n[R"U[R5 M+ g![
a M;f=fr&)�signal�SIGCHLDr�kill�SIGTERM�ProcessLookupError)�p�oldchldhandler�pidss ��r�killworkers�!_posixworker.<locals>.killworkers�sL���	�
�
�f�n�n�n�5��A�
�����6�>�>�*���&�
��
�s�%A�
A%�$A%Tc�Z>�TR5HunS=p#[R"X(aSO[R5up#U(dM?TRU5 [
U5nU(dMdTS(aMpUTS'Mw g![a TRU5 Naf=f�Nr)�copyr�waitpid�WNOHANG�ChildProcessError�discard�_exitstatus)�blocking�pidrK�strM�problems    ��r�waitforworkers�$_posixworker.<locals>.waitforworkers�s�����9�9�;�C��J�A�
"��
�
�3�h��B�J�J�H���
���L�L��O��R��B��r�'�!�*�*����
���%�
"����S�!�
"�s�/B�B*�)B*c�6>�T"SS9 TS(aT"5 gg)NF)rXrr*)�signum�framerNr[r\s  ���r�sigchldhandler�$_posixworker.<locals>.sigchldhandler�s�����&��1�:��M�r+���c�t>�TSSH1up[R"U5 [R"U5 M3 [R"T5 [R"T	S5nT"TT4-6H)n[R"X25 UR5 M+ SSS5 g!,(df   g=f)Nrc�wbr)r�close�fdopen�pickle�dump�flush)
�r�w�wf�resultr>�pargs�pipes�rfdr?�wfds
    ������r�
workerfunc� _posixworker.<locals>.workerfunc�s���� %�c�r�
�������������!+��H�H�S�M����3��-��&*�Z�5�(�-B�&D�F�"�K�K��3��H�H�J�'E�.��	.�-��s�)7B)�)
B7)�force��rbic��[R"UR5S5 UR5n[R"UR5S5 U$�NFT)r�set_blocking�fileno�peek)�f�ress  r�
peek_nonblock�#_posixworker.<locals>.peek_nonblocks:��
������
�E�*��f�f�h��
������
�D�)��
r+c3��># �[R"U5v� [T"U55S:�a0[R"U5v� [T"U55S:�aM/gg7frQ)rh�loadr<)r}rs �r�load_all�_posixworker.<locals>.load_allsJ�����k�k�!�n���-��"�#�a�'��+�+�a�.� ��-��"�#�a�'�s�AA"� A"c��>�[R"[RT5 T"5 [R"[RT5 TR5 TS$rQ)rF�SIGINTrGrf)rL�
oldhandlerr[�selectorr\s�����r�cleanup�_posixworker.<locals>.cleanupsA����
�
�f�m�m�Z�0����
�
�f�n�n�n�5������q�z�r+r�T)'r$rF�	getsignalr��SIG_IGN�setrGrjr�getpid�	partitionr r<�pipe�append�forkr	�	callcatch�sys�exc_info�
issubclass�KeyboardInterrupt�	traceback�_exit�add�	selectors�DefaultSelectorrf�registerrg�
EVENT_READ�select�fileobj�update�EOFError�
unregisterrHr�WorkerError)"r"r>r?r@rAr8r4ra�	parentpid�retval�retrYrs�exctyperur�r��	openpipes�key�eventsr~�statusrNrLr�rorrMrpr[rqr�r\rrs" ``                   @@@@@@@@@@@@rr;r;�s�������"�o�G��!�!�&�-�-�0�J�
�M�M�&�-�-����0��E�A�3�M�D�'�
� � �$�
�]�]�6�>�>�>�B�N��H�H�J��	�	��I��E�
�F���	��4��W�c�$�i�!8�9���7�7�9���S�
���c�3�Z� ���	(��'�'�)�C��a�x��
�
�f�m�m�Z�8��
�
�f�n�n�n�=�	�	��'�'��7���y�y�{�i�'�(��H�H�J��H�H�S�3�Y�'�
(�	
����
�a:�b�(�(�*�H����S�
����
�
	���"�)�)�C��t�4�i�6J�6J�K�
��!������J�	��!�m�'���0���V�#�'����4��$��Q��"�M�M�#�a�&�1�"%�I�	 5� 1��!�m�$�Y�F�
��A�:��G�G�B�I�I�K�&��)�����'�'���F�l����O	&��y�y�{�i�'���l�l�n�Q�'�G�"�7�,=�>�>�E��L�L�u�L�%��
����H�H�S�3�Y�'��
�y�y�{�i�'�(��H�H�J������H�H�S�3�Y�'��B�H�H�S�3�Y�'��
(��b �#��'�'����4��K�K�%�%�'���N�I�#����
��	�
�s��D5S�BN�S�&O"�6B1S�('S�AQ7�
S� A$S�AO�P�"O'�$O*�*P�S�Q4�#P4�3Q�4P8	�6Q�;Q4�Q0	�0Q4�4S�7AS�;S�?S�S�S�Sc���[R"U5(a[R"U5$[R"U5(a[R"U5*$g)z�convert a posix exit status into the same form returned by
os.spawnv

returns None if the process was stopped instead of exitingN)r�	WIFEXITED�WEXITSTATUS�WIFSIGNALED�WTERMSIG)�codes r�_posixexitstatusr�9sH��

�|�|�D����~�~�d�#�#�	����	�	����T�"�#�#�
r+c#��^^# �"SS[R5n/mUU4Sjn[T5n[RR5n	[RR5n
0n[
X8S-5HnU
RU5 M [U5H-n
U"X�X5nTRU5 UR5 M/ [T5S:�a�U	R5(dQU	R5nU(aUS(aURUS5 OUv� U	R5(dMQTSRS5 TVs/sHnUR!5(aMUPM nnUH-nUR"bUR"eTR%U5 M/ [T5S:�aM�U	R5(dQU	R5nU(aUS(aURUS5 OUv� U	R5(dMQU(aSU4v� ggs snf![&[(4a	 U"5 ef=f7f)	Nc�&�\rSrSrSrSrSrSrg)�_windowsworker.<locals>.WorkeriEc��[RR"U/UQ70UD6 XlX lX0lX@lSUlSUlSUl	gry)
r'�Thread�__init__�
_taskqueue�_resultqueue�_func�_staticargs�_interrupted�daemon�	exception)�self�	taskqueue�resultqueuer>r?r@�kwargss       rr��'_windowsworker.<locals>.Worker.__init__FsN��
���%�%�d�<�T�<�V�<�'�O� +���J�)�� %�D���D�K�!�D�Nr+c��SUlg)NT)r�)r�s r�	interrupt�(_windowsworker.<locals>.Worker.interruptRs
�� $�D�r+c���URR5(d�URR5nUR"URU4-6H1nUR
R
U5 UR(dM1 g URR5(dM�gg![RRa gf=f![anX0leSnAff=fr&)
r��empty�
get_nowaitr�r�r��putr�r�queue�Empty�	Exceptionr�)r�r@r~�es    r�run�"_windowsworker.<locals>.Worker.runUs���
��/�/�/�/�1�1�
�#���9�9�;��#'�:�:�t�/?�/?�4�'�/I�#J�C� �-�-�1�1�#�6� $�0�0�0� &�
$K��/�/�/�/�1�1��$�>�>�/�/������
�"#����	
�sG�C�A$B1�
B1�B1�C�1C�C�C�C�
C+�C&�&C+)r�r�r�r�r�r�r�N)�__name__�
__module__�__qualname__�__firstlineno__r�r�r��__static_attributes__r*r+r�Workerr�Es��
	"�	%�	r+r�c�.>�[R"5S-nTHnUR5 M TH]nU[R"5-
nURU5 UR5(dMCTR	[S55  g g)Nrs:failed to kill worker threads while handling an exception
)�timer��join�is_alive�warnr)�
cleanupend�t�
remainingtime�threadsr"s   ��r�trykillworkers�&_windowsworker.<locals>.trykillworkersksv����Y�Y�[�1�_�
��A�
�K�K�M���A�&�����4�M�
�F�F�=�!��z�z�|�|�
����3����r+�rrg�������?T)r'r�r$rr��Queuer�r��ranger��startr<r��getr�r�r�r��remover�r�)r"r>r?r@rAr8r�r�r4r�r�r�ro�_ir�r~�_t�finishedthreadsr�s`                 @r�_windowsworkerr�Ds�����"��!�!�"�H�G��*�"�o�G��.�.�&�&�(�K����$�$�&�I�
�F��4�2��.���
�
�e��/��G�n���9�4�<�����q��	���	����'�l�Q��!�'�'�)�)�!�o�o�'����Q���M�M�#�a�&�)��I�"�'�'�)�)�
�A�J�O�O�D�!�,3�I�G�b�2�;�;�=�r�G�O�I�$���;�;�*��+�+�%����q�!�%��'�l�Q�� ���!�!��o�o�����Q���M�M�#�a�&�!��I����!�!���F�l����J��

�(�)����
��sE�CI�A3I�I� H>�=H>�AI�	A$I�/I�>I�I�Ic#�B# �[U5HnXSU2v� M g7f)a�partition a list into N slices of roughly equal size

The current strategy takes every Nth element from the input. If
we ever write workers that need to preserve grouping in input
we should consider allowing callers to specify a partition strategy.

olivia is not a fan of this partitioning strategy when files are involved.
In his words:

    Single-threaded Mercurial makes a point of creating and visiting
    files in a fixed order (alphabetical). When creating files in order,
    a typical filesystem is likely to allocate them on nearby regions on
    disk. Thus, when revisiting in the same order, locality is maximized
    and various forms of OS and disk-level caching and read-ahead get a
    chance to work.

    This effect can be quite significant on spinning disks. I discovered it
    circa Mercurial v0.4 when revlogs were named by hashes of filenames.
    Tarring a repo and copying it to another disk effectively randomized
    the revlog ordering on disk by sorting the revlogs by hash and suddenly
    performance of my kernel checkout benchmark dropped by ~10x because the
    "working set" of sectors visited no longer fit in the drive's cache and
    the workload switched from streaming to random I/O.

    What we should really be doing is have workers read filenames from a
    ordered queue. This preserves locality and also keeps any worker from
    getting more than one file out of balance.
N)r�)�lst�nslices�is   rr�r��s#���:�7�^���*�W�*�o���s�r�)FTNr&)#�
__future__rrrhr�rFr�r'r��warnings�i18nr�rrrr	�filterwarnings�DeprecationWarningrr$r,�isposix�sysplatform�	iswindowsr/r.r6rCr;r�r�r:rWr�r*r+r�<module>r�s���#�	�
��
�
�������	����	@� ���
�,	(�A�

����-�-��;�
����M�'�0�0���M�#��
�&���/'�d\�~$�`�F���$�O�"�O�"�K�r+

Youez - 2016 - github.com/yon3zu
LinuXploit