Why different session can has independent Thread.CurrentThread.CurrentCulture? RRS feed

  • Question

  • User-2021386652 posted

    You know, Thread.CurrentThread is static variable, it means all thread can get the same value of this static variable.

    And session also can be regard as a thread. If there are two users UseA(sessionA) and UserB(sessionB).

    I think the two user can get same value of Thread.CurrentThread.

    but, another way, we can set the localization by Thread.CurrentThread.CurrentCulture. at this time, UserA set it as en-US, and UserB set it as zh-CN. Can they be interaction each other?

    Friday, November 4, 2011 5:14 AM


  • User1519636740 posted


    There is no relationship between  Thread.CurrentThread and session
    we know, session is created for each user in server side, and they have their own Thread.CurrentThread, maybe the inital Thread.CurrentThread is same.
    however, they can change their own Thread.CurrentThread no matter session 
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 8, 2011 3:01 AM