commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@apache.org>
Subject Re: Javaflow: suspending a thread from outside the thread
Date Wed, 02 Aug 2006 04:05:42 GMT
> I could make a public "suspend()" method within the thread that calls
> "Continuation.suspend();", but the problem is that the second user
> just gets a continuation object and has no reference to the actual
> thread.

Please note that you don't really need to make it "public" as
Continuation.suspend() is a public static method. All that matters to
the state of the continuation is kept in thread locals ...which is
also why you cannot really have another thread like that inside a
flow.

Synchronization problems aside I remember I was playing with that and
had it working to some extend - I'll try to dig that out. But I would
not want to synchronize the methods just to support something that
somehow just feels ...wrong.

Maybe explain your usecase...

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message