Articles Tagged “Multithreading”
8 articles tagged “Multithreading”, newest first.
-
The Win32 Thread Pool API — Concurrency That Does Not Create Threads, with CreateThreadpoolWork
Calling CreateThread everywhere in native code? A primary-source guide to the Win32 thread pool API: the work, timer, wait, and io objects, cleanup groups, a...
-
DllMain and the Loader Lock — The Real Reason You Are Told to "Do Nothing in DLL Initialization"
Why DllMain must not call LoadLibrary or wait on threads: the loader lock serializes DLL notifications, typical deadlocks, deferred initialization, and hang ...
-
What "Not Responding" Really Is — How Windows Decides an App Has Hung, and How to Design Apps That Don't
Windows marks a window Not Responding after 5 seconds without message retrieval and shows a ghost window: the check, hang causes, UI-thread design, and inves...
-
Spurious Wakeups — Why a Condition Variable Wakes "Without a Notification" and How to Wait Correctly on Windows
Condition variable waits can wake with no notification (spurious wakeups). Why Windows allows it, and the correct while-and-predicate wait in Win32, C++, and...
-
Practical Multithreading Best Practices: Java Edition — Conventions for the Virtual Thread Era
Run Java tasks on ExecutorService and virtual threads, not raw threads. Covers synchronized vs. ReentrantLock, cooperative stopping via interruption, atomic ...
-
Practical Multithreading Best Practices: C Edition — Writing Safely the Win32 API Way
In C on Win32 the established practice is _beginthreadex, SRW locks and condition variables, Interlocked, and a stop event plus WaitForMultipleObjects. Also ...
-
Practical Multithreading Best Practices: C++ Edition — Designing Failures Out with RAII and jthread
C++ data races are undefined behavior. Learn the std::thread destructor trap, stopping with jthread and stop_token, scoped_lock, atomic's real role, and Win3...
-
Practical Multithreading Best Practices: .NET Edition — What to Decide Before You Add More Threads
Keep .NET/C# threads from crashing or hanging. Ride on Task, cut shared mutable state, lock with discipline, stop with CancellationToken, and respect the UI ...