- Spring 5.0 Projects
- Nilang Patel
- 168字
- 2021-07-02 12:35:02
Subscription rules
The following interface describes the Subscription notation:
public interface Subscription {
public void request(long n);
public void cancel();
}
The rule number 3.2 says, Subscription must allow the Subscriber to call Subscription.request synchronously from within onNext or onSubscribe. It talks about preventing both Publisher and Subscriber by restricting posting of the message only when Publisher gets the signal for a further request from Subscriber. This happens in a synchronous manner to avoid a stack overflow.
In a similar context, another rule, number 3.3, states, Subscription.request() must place an upper bound on possible synchronous recursion between Publisher and Subscriber. It complements rule 3.2 in a sense by deciding an upper limit in the recursive interaction between Publisher and Subscriber in the form of the onNext() and request() call. Setting the upper limit will avoid blowing out when calling a thread stack. The rules starting from number 3.5 to 3.15 describe the behavior of cancelling and completing the request.
- 工業(yè)控制網(wǎng)絡(luò)安全技術(shù)與實(shí)踐
- SEO 20日
- SD-WAN架構(gòu)與技術(shù)(第2版)
- PLC、現(xiàn)場(chǎng)總線(xiàn)及工業(yè)網(wǎng)絡(luò)實(shí)用技術(shù)速成
- Wireshark網(wǎng)絡(luò)分析就這么簡(jiǎn)單
- 中國(guó)互聯(lián)網(wǎng)發(fā)展報(bào)告2018
- 物聯(lián)網(wǎng)長(zhǎng)距離無(wú)線(xiàn)通信技術(shù)應(yīng)用與開(kāi)發(fā)
- OMNeT++與網(wǎng)絡(luò)仿真
- 通信原理及MATLAB/Simulink仿真
- INSTANT KineticJS Starter
- Master Apache JMeter:From Load Testing to DevOps
- 網(wǎng)絡(luò)安全之道
- 區(qū)塊鏈社區(qū)運(yùn)營(yíng)手冊(cè)
- 趣話(huà)通信:6G的前世、今生和未來(lái)
- ReasonML Quick Start Guide