Maarten Bosteels wrote:
Very nice !

Let's see whether I understand it correctly:

When the thread is suspended, eg waiting for session.read() to return, the
thread actually suspends the execution of the run() method for that specific
ContinuableIoSession
and the thread could possibly resume the run() method for another
ContinuableIoSession, right ?

Maarten
Yes, that's correct! javaflow uses byte-code magic to enable suspend/resume. The number of possible clients isn't thread bound. Of course javaflow will need some memory to save the call stack and frames when suspending which means it will consume some extra memory. I don't know how much though. I guess it mostly depends on the complexity of the code.

/Niklas

Reply via email to