+
    8Li`	                         R t ^ RIt^ RIHtHt ^ RIHt ^ RIHt ]P                  ! ]
4      t]P                  ]P                  ]P                  uttt ! R R4      tR# )z,Msgpack handling in the event loop pipeline.N)PackerUnpacker)unicode_errors_defaultBaseEventLoopc                   f   a  ] tR t^t o RtV 3R lR ltR tR tR tR t	R t
V 3R	 lR
 ltRtV tR# )MsgpackStreamzTwo-way msgpack stream that wraps a event loop byte stream.

This wraps the event loop interface for reading/writing bytes and
exposes an interface for reading/writing msgpack documents.
c                $   < V ^8  d   QhRS[ RR/# )   
event_loopreturnNr   )format__classdict__s   "C/usr/lib/python3/dist-packages/pynvim/msgpack_rpc/msgpack_stream.py__annotate__MsgpackStream.__annotate__   s        =  T      c                t    Wn         \        \        R7      V n        \	        \        R7      V n        RV n        R# )z/Wrap `event_loop` on a msgpack-aware interface.)unicode_errorsN)loopr   r   _packerr   	_unpacker_message_cb)selfr   s   &&r   __init__MsgpackStream.__init__   s)    	-CD!1GHr   c                <    V P                   P                  V4       R# )z/Wrapper around `BaseEventLoop.threadsafe_call`.N)r   threadsafe_call)r   fns   &&r   r   MsgpackStream.threadsafe_call   s    		!!"%r   c                p     V P                   P                  V P                  P                  V4      4       R# )z Queue `msg` for sending to Nvim.N)r   sendr   pack)r   msgs   &&r   r!   MsgpackStream.send   s$    		t||((-.r   c                j    Wn         V P                  P                  V P                  4       RV n         R# )zRun the event loop to receive messages from Nvim.

While the event loop is running, `message_cb` will be called whenever
a message has been successfully parsed from the input stream.
N)r   r   run_on_data)r   
message_cbs   &&r   r&   MsgpackStream.run%   s&     &		dmm$r   c                :    V P                   P                  4        R# )zStop the event loop.N)r   stopr   s   &r   r+   MsgpackStream.stop/   s    		r   c                :    V P                   P                  4        R# )zClose the event loop.N)r   closer,   s   &r   r/   MsgpackStream.close3   s    		r   c                $   < V ^8  d   QhRS[ RR/# )r
   datar   N)bytes)r   r   s   "r   r   r   7   s      U t r   c                    V P                   P                  V4          \        V P                   4      p V P                  f   Q hV P                  V4       K<    \         d      R# i ; i)TN)r   feednextr   StopIteration)r   r2   r#   s   && r   r'   MsgpackStream._on_data7   se    D!4>>*''333  %  s   8A A('A()r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   r!   r&   r+   r/   r'   __static_attributes____classdictcell__)r   s   @r   r   r      s7        &/  r   r   )r=   loggingmsgpackr   r   pynvim.compatr   "pynvim.msgpack_rpc.event_loop.baser   	getLoggerr9   loggerdebuginfowarningwarnr    r   r   <module>rK      sJ    2  $ 0 <			8	$\\6;; tT8 8r   