U
vi
@ s d dl Z d dl mZ d dlmZmZmZmZ d dlmZm Z d dl
mZ edZdeeg df ee j
eee gdf dd d
Zd
gZdS ) N)Future)CallableOptionalTypeVarcast)
Observableabc)SequenceContainsNoElementsError_T
Future[_T])future_ctor schedulerreturnc s2 | pt j}| tt dd fdd}|S )Nr )sourcer c sl dt tdtdfdd}tdfdd}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.
FNvaluec s | d d S )NT r ) has_value
last_valuer N/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_tofuture.pyon_next( s z.to_future_.