I am studying on the reactive programming in Java with webflux spring boot library.
I have read a lot of articles about why and how we use non-blocking library. Here is the general idea I have gotten.
Reactive programming can be achieved by putting high loading stuff in
callback function and register it to an event which would be monitored
by an event loop. So the thread doesn't need to be blocked and could
be freed for other requests.
But it doesn't add up to my Java concept.
Every thread has its own stack, local variables and program counter according to my understanding. (Please correct it if I am wrong). Where would the states of the thread would be stored/ handled before it "handles" other request?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…