开发者

Carrying over Components with PerThread Lifestyle

开发者 https://www.devze.com 2023-02-08 13:29 出处:网络
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

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消