🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-08 02:20:53 | PHP 8.2.32
📂
/ (Root)
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
reactivex
/
subject
/
__pycache__
📍 /opt/alt/python38/lib/python3.8/site-packages/reactivex/subject/__pycache__
🔄 Refresh
✏️
Editing: behaviorsubject.cpython-38.pyc
Read Only
U v�i� � @ sd d dl mZmZmZ ddlmZ ddlmZ ddlm Z ddl mZ ed�ZG d d � d ee �Z dS )� )�Optional�TypeVar�cast� )�abc)� Disposable� )�InnerSubscription)�Subject�_Tc sl e Zd ZdZedd�� fdd�Zdeje eej ej d�dd�Zedd�d d �Zdd�� fdd �Z � ZS )�BehaviorSubjectz�Represents a value that changes over time. Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications. N)�value�returnc s t � �� || _dS )a4 Initializes a new instance of the BehaviorSubject class which creates a subject that caches its last value and starts with the specified value. Args: value: Initial value sent to observers when no other value has been received by the subject yet. N)�super�__init__r )�selfr �� __class__� �R/opt/alt/python38/lib/python3.8/site-packages/reactivex/subject/behaviorsubject.pyr s zBehaviorSubject.__init__)�observer� schedulerr c C sr | j �H | �� | jsD| j�|� |�| j� t| |�W 5 Q R � S | j}W 5 Q R X |rd|� |� n|� � t� S )N)�lockZcheck_disposedZ is_stopped� observers�append�on_nextr r � exceptionZon_errorZon_completedr )r r r �exr r r �_subscribe_core s zBehaviorSubject._subscribe_corec C s: | j � | j�� }|| _W 5 Q R X |D ]}|�|� q&dS )z1Notifies all subscribed observers with the value.N)r r �copyr r )r r r r r r r � _on_next_core3 s zBehaviorSubject._on_next_core)r c s, | j � ttd�| _t� �� W 5 Q R X dS )z�Release all resources. Releases all resources used by the current instance of the BehaviorSubject class and unsubscribe all observers. N)r r r r r �dispose)r r r r r! <