JUnit Testing in Multithread Application
This is a problem me and my team faces in almost all of the projects. Testing certain parts of the application with JUnit is not easy and you need to start early and to stick to it, but that’s not the question I’m asking. The actual problem is that with n-Threads, locking, possible exceptions within the threads and shared objects the task of testing is not as simple as testing the class, but testing them under endless possible situations within threading.
When would you need “hundreds of thousands” of threads?
Erlang, Go, and Rust all claim in one way or another that they support concurrent programming with cheap “threads”/coroutines. The Go FAQ states:
Spurious wakeups explanation sounds like a bug that just isn’t worth fixing, is that right?
According to the Wikipedia article on Spurious Wakeups
Why Was Python Written with the GIL?
The global interpreter lock (GIL) seems to be often cited as a major reason why threading and the like is a touch tricky in Python – which raises the question “Why was that done in the first place?”
Should I split out synchronization from my class and what’s it called?
When thinking about testability and modular code, I recently thought about whether I should split out the synchronization part of a class from the actual behavior part.
How bad would it be to obtain a lock on every object?
Imagine a hypothetical programming environment that is largely like Java or .NET, i.e. object-oriented, garbage-collected, etc., but with one small change:
BackgroundWorker vs. Async/Await
I am new to C# development and wish to create a more responsive UI. In my preliminary research, I have seen two methods for achieving this:
What makes a series of machine instructions an actual process/thread in memory?
Every instruction comes from main memory/RAM.
Allow threads (in c) to print messages without interfering with user input
I’m a writing a small webserver for personal use in c (not c++). I want to allow user input in the console like “shutdown server” or “restart server”.
Thread safety IDE warnings
I wonder, would it not be possible for an IDE to detect any shared mutable objects that are used in multiple threads?