Publishers.PrefixUntilOutput
μ λ€λ¦ ꡬ쑰체
μ΄λμ λΌμ΄μ λ λ κ°μ μΈμλ₯Ό λ°λλ€.
upstream
: μμμ νλ₯΄λ Publisherother
: 첫 μΆλ ₯μ΄upstream
Publisherλ₯Ό μ’ λ£νκ² νλ Publisher
λ€λ₯Έ Publisherκ° κ°μ λΌ λκΉμ§ κΈ°μ‘΄ Publisherκ° μμλ₯Ό λ°ννλ λμμ ꡬννκΈ° μν΄ μ¬μ©νλ€.
prefix
μ€νΌλ μ΄ν°μ κ΄λ ¨μ΄ μλ€.
μ½λλ λ€μκ³Ό κ°μ μμλ‘ λμνλ€.
1μ μ½λλ₯Ό μ€ννλ©΄
sourceSubject
μ 1μ κ°μ μ λ¬νλ©°,otherSubject
κ° κ°μ λ°νν μ μ΄ μμΌλ―λ‘ κ·Έλλ‘ 1μ κ°μ λΈλ€.2μ μ½λλ₯Ό μ€ννλ©΄
otherSubject
μ 2μ κ°μ μ λ¬νλ€. μ΄ λsourceSubject
λ λ€λ₯Έ Publisherκ° κ°μ μ λ¬λ°μμΌλ―λ‘ μ’ λ£νλ€.3μ μ½λλ₯Ό μ€ννλ©΄
sourceSubject
μ 3μ κ°μ μ λ¬νλ€. νμ§λ§sourceSubject
λ 4μ μ½λμ μ€νμ μν΄ μ΄λ―Έ μ’ λ£νμμΌλ―λ‘ ν¨λ ₯μ΄ μλ€.
RxSwift
takeUntil
μ€νΌλ μ΄ν°λ₯Ό μ¬μ©νμ¬ κ΅¬νν μ μλ€.
ReactiveSwift
take
μ€νΌλ μ΄ν°λ₯Ό μ¬μ©νμ¬ κ΅¬νν μ μλ€.
μ°Έκ³
Last updated
Was this helpful?