Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Classes and Thread Safety

I'm designed a multi-threaded system whereby any number of databases will be "registered" with a single windows service.

Every few minutes the service will pull a list of the registered databases and start to spawn worker threads for each of the registered databases (to a max of 5 threads). Each thread will have the job of processing data in its assigned database that has been marked to be emailed.

My question is that standard class objects are not inherently thread safe (or so says the MS documentation). What so of step am I going to have to take to make a class object thread safe?

Laurence -
[638 byte] By [Hunterlmc] at [2007-11-11 7:37:05]