What is thread safety?

Discussion in 'ASP .Net' started by Hans, Oct 11, 2004.

  1. Hans

    Hans Guest

    Is there anyone can explain "thread safety" in detail for me please?
    Hans, Oct 11, 2004
    #1
    1. Advertising

  2. Hans

    Sahil Malik Guest

    A peice of code is deemed thread safe, if it can be called from multiple
    threads without unwanted/unexpected interaction.

    This involves a lot of weird issues you have to field in a multi threaded
    world. Re-entrancy problems, variables being changed unexpectedly etc. are
    some examples. Certain standard programming techniques like statics become
    really interesting in making a class threadsafe.

    Another related topic is Thread Affinity. And hence they say, for anything
    to enlist in MTS, it has to be both thread safe and not have thread
    affinity. (ok I'm rambling now).

    - Sahil Malik
    You can reach me thru my blog at
    http://www.dotnetjunkies.com/weblog/sahilmalik



    "Hans" <> wrote in message
    news:%...
    > Is there anyone can explain "thread safety" in detail for me please?
    >
    >
    Sahil Malik, Oct 12, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Ter-Saakov

    LiteralControl thread safety.

    George Ter-Saakov, Apr 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    325
    Martin Dechev
    Apr 6, 2004
  2. Simon Harvey

    A thread safety question

    Simon Harvey, Aug 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    401
    Alvin Bruney [MVP]
    Aug 6, 2004
  3. thechaosengine

    Thread safety when subclassing the Page class

    thechaosengine, Dec 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    394
    Scott Allen
    Dec 10, 2004
  4. =?Utf-8?B?RGlmZmlkZW50?=

    Thread-safety and Singleton methods

    =?Utf-8?B?RGlmZmlkZW50?=, Jan 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    508
    Karl Seguin
    Jan 13, 2005
  5. =?Utf-8?B?RmVuZw==?=

    Thread safety issue

    =?Utf-8?B?RmVuZw==?=, Jun 15, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    449
    Bruce Barker
    Jun 16, 2005
Loading...

Share This Page