'Java reactive programming. Thread management fundamentals

I am learning Java RX Reactive programming. I am dwindled with a very basic question on the Asynch call that Java Reactive calls. So here is a scenario: It is as follows:

input(a,b,c)
#1CPU op on a b c
#2Do some more CPU bound op
#3IO bound op ( calling DB to get 30 rows)
#4Business Logic

Now what I understand in normal non reactive programming, a worker thread would have been assigned to handle the request for input(a,b,c) and since #3 is a time-consuming op. this current thread might go to waiting state. Here comes the reactive framework and the current thread will be assigned to serve another input request instead of waiting to get all the records from DB and once we have all the records any available thread will cater execution #4 onwards. So my question is since the current thread left from #3 how will the next available thread will know from where to start execution? (i.e.#4) where and how JVM is storing the data and all executed information and varibables up until line #2? I belive simple call stack will not work here as there are multiple threads are running simultaneously. Please help me out.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source