Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Thread safety: is my thread safe?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00961688
Message ID:
00961814
Vues:
5
David,
Well my class id working just fine and I have not had any problems with it yet (except for the static property issue I described earlier). There should only be one class instance connecting to the device using TCP/IP at the time. The device only supports one connection at the time. My receiving thread is a pretty minimal use for the threading technology, but it works great and I don't think I want to rewrite and pull the receiving of data into the main thread.
But then again it doesn't hurt to learn more about threading. Thanks for the link and book tip.

>>David,
>>So does that mean that a non-static member can be made just as thread-safe as a static member?
>
>Sure.
>
>>I guess I need to read some more about threads in .NET, do you know of any good books or articles about threads and thread-safety?
>>
>
>Yes. Personally, I would not attempt multithreading without a basic understanding of the consequences. I have not read the whole thing but Juval Lowy, who is probably the biggest expert out there, has a book about multithreading. There is an excerpt from his book here: http://www.ftponline.com/conferences/vslive/2003/ch/chapters/NETComponents.pdf
>
>That book might be overkill. Just googling for some introductory articles will probably tell you enough to get the job done.
>
>>Einar
>>
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform