Carrying over Components with PerThread Lifestyle

129 views Asked by At

I have some per-thread components in my Windsor container. I'm also using PLINQ. In the specific case of PLINQ operations, I actually want some of these components carried over to the new thread.

Does anyone have a suggestion for how to intelligently implement such a behavior for Windsor?

Thanks.

1

There are 1 answers

0
Mauricio Scheffer On BEST ANSWER

PerThread evidently won't work in this case, since PLINQ is multi-threaded and so the container will produce new instances. You might want to try ContextualLifestyle or something like it.