I see your point.
But it is not trivial to periodically check a context variable if the
thread performs complex calculation and uses other object's methods
which take a long time to execute.
In java, I could just call Thread.stop(), even if it is depricated...

Deprecated because in reality you should never use it. Maybe google a
bit about it. Especially true if you are using native code - not java.

But this is not a Javaflow specific problem but merely a general
thread problem that I should solve.

True. There are ways to do this ...but building this into javaflow - I
am not sure whether that's really the right way. And you could still
not stop the continuation at any time. If you would execute a long
running external task you would still have to wait (e.g. database
selects)! Javaflow works a (little) bit like cooperative multitasking
in this regards.

I think I can find a work around with introducing some overhead for
the user so that he has to check the context during his calculations,
although it will slow down the calculation.

Well, otherwise this would be just hidden through javaflow. Maybe
slightly less overhead - but I am not even sure how the requirement
for synchronization would affect the execution speed.

If you want to do stuff like that I suggest to split your tasks.

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to