Tagged Questions
4
votes
2answers
558 views
Threadsafe DBContext in singleton
I found out the hardway that access to DbContext in .NET is not threadsafe. I have a singleton for logging things using a dbcontext. The original version uses something like
public Logger{
private ...
4
votes
1answer
998 views
Singleton class extending a parent class to utilise shared functionality
I have a singleton class which extends from an abstract java class. Two singleton classes extend from ItemImageThreadManager, the reason for this is to use shared scheduling functionality. A thread is ...
2
votes
1answer
335 views
Is this a good implementation of a thread-safe singleton using the observer pattern?
I need a singleton that can safely operate in a multi-thread environment. Threading and concurrency is new to me, so I'm not sure if this implementation holds. Take a look:
public class ...