Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
utilities.cpython-313.pyc42 linesDownload Raw Back to __pycache__
1�

2��j���|�SrSSKrSSKrSSKJr SSKJr SSKJr SSKJr Sr	"SS	\R5rS3rg)z'Utilities for the gRPC Python Beta API.�N)�implementations)�4interfaces)�
callable_util)�futurez6Exception calling connectivity future "done" callback!c�n�\rSrSrSrSrSrSrSrSr	Sr5SS6jrSSjrSSjr
S
rSrSrSrg	)�_ChannelReadyFuture�c�n�[R"5UlXlSUlSUl/Ulg)NF)�	threading�	Condition�7_condition�_channel�_matured�8_cancelled�_done_callbacks)�self�channels  �YD:\code\apps\devtools\python\user_packages\Python313\site-packages\grpc/beta/utilities.py�__init__�_ChannelReadyFuture.__init__s-��#�-�-�/����
���
����!���c���UcSO[R"5U-nUR UR(a[R"5eUR9(a10SSS5 gUcURR
5 OLU[R"5-11nUS:a[R"5eURR
US9 M�!,(df   g=f)Nr)�timeout)�timer
rr�CancelledErrorr�wait�TimeoutError)rr�until�	remainings    r�_block�_ChannelReadyFuture._block's������T�Y�Y�[�7�-B��
�_�_���?�?� �/�/�1�1��=�=���_��=��O�O�(�(�*� %��	�	�� 3�I� �1�}�$�1�1�3�3��O�O�(�(��(�;���_�s�:C�-A,C�12C'c���UR UR(d�U[RRLacSUlURRUR5 URR5 [UR5nSUlO13SSS5 gSSS5 WHn[R"U[U5 M! g!,(df   N4=f)NT)r
rr�ChannelConnectivity�READYrr�unsubscribe�_update�14notify_all�tuplerr�call_logging_exceptions�$_DONE_CALLBACK_EXCEPTION_LOG_MESSAGE)r�connectivity�done_callbacks�
done_callbacks    rr&�_ChannelReadyFuture._update7s���
�_�_��O�O� �J�$B�$B�$H�$H�H� $��
��
�
�)�)�$�,�,�7����*�*�,�!&�t�';�';�!<��'+��$���_�%��,�M��1�1��C�T�
�,��_�s�BC�15C&c��UR UR(dcSUlURR	UR165 URR
5 [UR5nSUlO17SSS5 gSSS5 WHn[R"U[U5 M! g!,(df   N4=f)NTF)r
rrrr%r&r'r(rrr)r*)rr,r-s   r�cancel�_ChannelReadyFuture.cancelJs���
�_�_��=�=�"&����
�
�)�)�$�,�,�7����*�*�,�!&�t�';�';�!<��'+��$���_�%�
�,�M��1�1��C�T�
�,�18��_�s�A6B;�;19C	c�h�UR URsSSS5 $!,(df   g=f�N)r
r�rs r�	cancelled�_ChannelReadyFuture.cancelled\s��
�_�_��?�?��_�_�s�#�201c��UR UR(+=(a UR(+sSSS5 $!,(df   g=fr3�r
rrr4s r�running�_ChannelReadyFuture.running`s)��
�_�_����&�<�t�}�}�+<��_�_�s�)A�21Ac��UR UR=(d URsSSS5 $!,(df   g=fr3r8r4s r�done�_ChannelReadyFuture.doneds#��
�_�_��?�?�3�d�m�m��_�_�s	�6�22ANc�&�URU5 gr3�r �rrs  r�result�_ChannelReadyFuture.resulth������G�rc�&�URU5 gr3r?r@s  r�	exception�_ChannelReadyFuture.exceptionkrCrc�&�URU5 gr3r?r@s  r�	traceback�_ChannelReadyFuture.tracebacknrCrc���UR UR(d6UR(d%URR	U5 SSS5 gSSS5 U"U5 g!,(df   N=fr3)r
rrr�append)r�fns  r�add_done_callback�%_ChannelReadyFuture.add_done_callbackqsG��
�_�_��?�?�4�=�=��$�$�+�+�B�/���_�_�23	�4���_�s�?A&�&24A4c��UR URRURSS9 SSS5 g!,(df   g=f)NT)�try_to_connect)r
r�	subscriber&r4s r�start�_ChannelReadyFuture.startys.��
�_�_��M�M�#�#�D�L�L��#�F��_�_�s	�%;�25A	c���UR UR(d6UR(d%URR	UR265 SSS5 g!,(df   g=fr3)r
rrrr%r&r4s r�__del__�_ChannelReadyFuture.__del__}s6��
�_�_��?�?�4�=�=��
�
�)�)�$�,�,�7��_�_�s�AA�27A,)rrr
rrr3)�__name__�28__module__�__qualname__�__firstlineno__rr r&r0r5r9r<rArErHrMrRrU�__static_attributes__�rrrrsD��"�<� �&�$#�=�4�����G�8rrc�<�[U5nUR5 U$)a�Creates a future.Future tracking when an implementations.Channel is ready.29 30Cancelling the returned future.Future does not tell the given31implementations.Channel to abandon attempts it may have been making to32connect; cancelling merely deactivates the return future.Future's33subscription to the given implementations.Channel's connectivity.34 35Args:36  channel: An implementations.Channel.37 38Returns:39  A future.Future that matures when the given Channel has connectivity40    interfaces.ChannelConnectivity.READY.41)rrR)r�ready_futures  r�channel_ready_futurer_�s ��'�w�/�L������r)
�__doc__rr�	grpc.betarr�grpc.framework.foundationrrr*�Futurerr_r\rr�<module>rds@��.���&� �3�,�=�%�42b8�&�-�-�b8�Jr
codekingpro/portable-devtools · Team Ai