What is thread safety?

S

Sahil Malik

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,888
Messages
2,569,964
Members
46,293
Latest member
BonnieHamb

Latest Threads

Top