I want to implement Singleton and found this acrticle from MSDN with several examples:
http://msdn.microsoft.com/en-us/library/ff650316.aspx
I have application that host WCF service.
the application get String from Client, and sent this string to my Singleton.
And from Singleton class i am open my Job class that do my stuff (open process..).
The job class contain Event that each time process started to ends update my UI.
and Singleton class should subscribe to this event.
Also i am open new Singleton instance when my application start.
My service ServiceBehavior defined as ConcurrencyMode.Multiple and InstanceContextMode.PerSession so every client message create new instance:
[ServiceBehavior(
ConcurrencyMode = ConcurrencyMode.Multiple,
InstanceContextMode = InstanceContextMode.PerSession)]
so my only qustion is shold i use thread safe or non thread safe in my Singleton class ?