thread (5,350)


c++ - Heap corruption under Win32; how to locate?

c++ - Heap corruption under Win32; how to locate?

I'm working on a multithreaded C++ application that is corrupting the heap. The usual tools to locate this corruption seem to be inapplicable. Old builds(18 months old) of the source code exhibit the…


multithreading - What are some good resources for learning threaded programming?

With the rise of multicore CPUs on the desktop, multithreading skills will become a valuable asset for programmers. Can you recommend some good resources(books, tutorials, websites, etc.) for a prog…


Global Exception Handling for winforms control

When working on ASP.NET 1.1 projects I always used the Global.asax to catch all errors. I'm looking for a similar way to catch all exceptions in a Windows Forms user control, which ends up being a hos…


c# - How do I make event callbacks into my win forms thread safe?

When you subscribe to an event on an object from within a form, you are essentially handing over control of your callback method to the event source. You have no idea whether that event source will ch…


Thread safe lazy construction of a singleton in C++

Is there a way to implement a singleton object in C++ that is: Lazily constructed in a thread safe manner(two threads might simultaneously be the first user of the singleton-it should still only be co…



Is the C# static constructor thread safe?

In other words, is this Singleton implementation thread safe: public class Singleton{private static Singleton instance; private Singleton(){} static Singleton(){instance=new Singleton();}public static…


Is accessing a variable in C# an atomic operation?

I've been raised to believe that if multiple threads can access a variable, then all reads from and writes to that variable must be protected by synchronization code, such as a "lock" statement, becau…


multithreading - Analyzing Multithreaded Programs

We have a codebase that is several years old, and all the original developers are long gone. It uses many, many threads, but with no apparent design or common architectural principles. Every develo…


c# - When should I not use the ThreadPool in.Net?

When should I not use the ThreadPool in.Net? It looks like the best option is to use a ThreadPool, in which case, why is it not the only option? What are your experiences around this?…


multithreading - How should I unit test threaded code?

I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield. I'd like to ask how people have gone about testing code that relies on threa…




example java how safe threads multithreading not main and multiple