🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-08 16:49:57 | PHP 8.2.32
📂
/ (Root)
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
reactivex
/
operators
/
__pycache__
📍 /opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/__pycache__
🔄 Refresh
✏️
Editing: _tofuture.cpython-38.pyc
Read Only
U v�i � @ s� d dl Z d dl mZ d dlmZmZmZmZ d dlmZm Z d dl mZ ed�Zdeeg df ee j eee gdf d�d d �Zd gZdS )� N)�Future)�Callable�Optional�TypeVar�cast)� Observable�abc)�SequenceContainsNoElementsError�_T� Future[_T])�future_ctor� scheduler�returnc s2 | pt �� j}|� � tt dd�� �fdd�}|S )Nr )�sourcer c sl d�t td��td���fdd�}td��fdd�}���fd d �}| j|||�d�� ��� fdd �� �S )a. Converts an existing observable sequence to a Future. If the observable emits a single item, then this item is set as the result of the future. If the observable emits a sequence of items, then the last emitted item is set as the result of the future. Example: future = reactivex.return_value(42).pipe(ops.to_future(asyncio.Future)) Args: future_ctor: [Optional] The constructor of the future. Returns: A future with the last value from the observable sequence. FN��valuec s | �d� d S )NT� r )� has_value� last_valuer �N/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_tofuture.py�on_next( s z.to_future_.<locals>.to_future.<locals>.on_next��errc s � � � s� �| � d S �N)� cancelled� set_exceptionr )�futurer r �on_error. s z/to_future_.<locals>.to_future.<locals>.on_errorc s, � � � s$�r� ��� n� �t� � d �d S r )r � set_resultr r r )r r r r r �on_completed2 s z3to_future_.<locals>.to_future.<locals>.on_completed)r c s � � � S r )Zdispose)�_)�disr r �<lambda><