2
votes
1answer
357 views

Python multithreading and utilizing modern processors - what is the downside?

CPython implementation detail: In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome ...
13
votes
1answer
772 views

Best practise is not to poll…but isn't polling happening internally anyway when a thread calls wait()?

Say we have some thread that wants to check when another thread is finished its task. I have read that we should call a wait() type function that will make this thread wait until it receives a ...
2
votes
3answers
189 views

Is there a way to calculate whether to spawn a new thread or use current thread

I am building an interpret DSL in which parallelism is part of the language - the user simply states that a calculation can be done in parallel and the interpreter may decide whether to make the ...
7
votes
2answers
672 views

Parallelism implies concurrency but not the other way round right?

I often read that parallelism and concurrency are different things. Very often the answerers/commenters go as far as writing that they're two entirely different things. Yet in my view they're related ...
7
votes
5answers
233 views

When developing a piece of software, when do you start thinking/designing the concurrent sections?

Following along with the principle of not optimizing too early, I'm wondering at what point in the design / development of a piece of software do you start thinking about the concurrency ...
3
votes
3answers
261 views

How to you solve the problem of implicit locking and parallel execution?

Where the code is: function A() { lock() doSomething() unlock() } We can call A safely from multiple threads, but it never be executed in parallel . For parallel execution, we have to ...
0
votes
5answers
648 views

Examples of concurrent iterating scenarios needed

I'm trying to wrap my head around different concurrency solutions to several threads iterating over the same collection but I'm having difficulty coming up with good realistic (but preferably easy to ...