People who code: we want your input. Take the Survey

Questions tagged [concurrency]

For challenges involving concurrency, which is when different threads of execution interact with each other.

Filter by
Sorted by
Tagged with
7
votes
3answers
381 views

Computationally Calculate Core Count

Almost all operating systems allow you to run multiple programs at the same time. If your system does not have enough processors to run all the programs you want to run, it starts to give each program ...
18
votes
2answers
599 views

Finding the Deadlock

Finding the Deadlock When programming a multithreading application one must take good care to avoid deadlocking the various threads when accessing shared resources. A deadlock occurs when a thread ...
7
votes
2answers
318 views

Create a sophisticated livelock

The point of the puzzle is to learn about livelocks: Create a multi-threaded (or a multi-process) program, whose threads (processes) indefinitely try to wait for each other and never finish. Unlike a ...
11
votes
18answers
3k views

Shortest Code that creates a Deadlock

Write the shortest code to create a deadlock. Code execution must halt, so this doesn't work: ...