Hi Ruslan,
On Apr 12, 2008, at 12:02 PM, rssh wrote:
On Sat, 12 Apr 2008 11:25:29 +0200, Vincent
Massol wrote
Hi,
Sorry, may be this is not my question, but: I can imagine situation,
where
ThreadLocal approach will fail: it's when we do asynchronics call
to some
external entity with callback. In such case callback will not
receive context in
ThreadLocal. And it is possible (and very common approach) to do
this from
groovy scripts (as groovy has closures).
I don't understand what would not work... Would you mind giving some
details and use cases?
It is common to call long external process in one branch (for example fetching
external URL) and check for timeout in other branch.
All closures, which would evaluated inside doParallel will have not access to
ThreadLocal.
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Ruslan Shevchenko
GradSoft.