This was answered by Mr. Jon Skeet on another site.
Quote from Post
It’s the equivalent to putting lock(this) round the whole method call.
The post has more example code.
More Related Contents:
- Could you explain STA and MTA?
- Thread vs ThreadPool
- BackgroundWorker vs background Thread
- Max number of concurrent HttpWebRequests
- Is it safe just to set CheckForIllegalCrossThreadCalls to false to avoid cross threading errors during debugging?
- Run code on UI thread in WinRT
- Double-checked locking in .NET
- ApartmentState for dummies
- System.Threading.Tasks – Limit the number of concurrent Tasks
- Simple description of worker and I/O threads in .NET
- Where do I get a thread-safe CollectionView?
- Unit testing a multithreaded application?
- Making sure OnPropertyChanged() is called on UI thread in MVVM WPF app
- Parallelizing GDI+ Image Resizing .net
- Identifying the client during a .NET remoting invocation
- “The calling thread must be STA, because many UI components require this” error when creating a WPF pop-up Window in thread
- Using SynchronizationContext for sending events back to the UI for WinForms or WPF
- How to handle all unhandled exceptions when using Task Parallel Library?
- Can/Does WPF have multiple GUI threads?
- Entity Framework and Multi threading
- DispatcherTimer vs a regular Timer in WPF app for a task scheduler
- .NET, the SqlConnection object, and multi-threading
- How to prevent a new WPF form from stealing focus?
- Does Console.WriteLine block?
- How to force a Solution file (SLN) to be opened in Visual Studio 2013?
- Custom app.config Config Section Handler
- Referencing Google’s V8 engine from a .NET app
- Windows 7 .net Excel .SaveAs() Error Exception from HRESULT: 0x800A03EC
- Can you link to a good example of using BackgroundWorker without placing it on a form as a component?
- Opening XPS document in .Net causes a memory leak