[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Henrik de Jong

9/1/2004 2:08:00 PM

Hello,

I'm using a singleton hosted in IIS. In the singleton I'm using a
hashtable. My question is: Can I add and remove objects to this
hashtable without concerning about locking or something like that. Or:
are singletons thread-safe?

kind regards,
Henrik
1 Answer

Ken Kolda

9/1/2004 3:43:00 PM

0

Remoting will do nothing to ensure the thread safety of your singleton, so
if you have shared data you must implement your own locking to ensure
consistency.

Ken


"Henrik de Jong" <hj.de.jong@planet.nl> wrote in message
news:ekYqe3CkEHA.3608@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> I'm using a singleton hosted in IIS. In the singleton I'm using a
> hashtable. My question is: Can I add and remove objects to this
> hashtable without concerning about locking or something like that. Or:
> are singletons thread-safe?
>
> kind regards,
> Henrik