KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
[ThreadStatic] private static Foo _foo; public static Foo CurrentFoo { get { if (_foo == null) { _foo = new Foo(); } return _foo; } } Is the previous code thread safe? Or do we need to lock the method?
Tags (comma-separated)
Save Edits
Cancel