0
votes
1answer
98 views

Is this an spurious wakeup or just a funky (non-spurious) race condition?

According to wikipedia: "The race conditions that cause spurious wakeups should be considered rare". But when I run this code, it is showing me that spurious wakeup happens quite often. Is this ...
0
votes
1answer
74 views

Synchronized access to network industrial equipment

I have an industrial equipment which is controlled by a software. The software connects to it using sockets, and keeps the connection all the time alive, while from time to time sending commands to ...
0
votes
2answers
181 views

MVC pattern synchronisation

I am facing a problem in synchronizing my model and view threads I have a view which is table. In it, user can select a few rows. I update the view as soon as the user clicks on any row since I don't ...
0
votes
2answers
84 views

Locking techniques

Delphi RAD libraries implement many thread friendly objects in a way which forces one to declare another object for storing the reference returned by that object's locking method. The object thus ...
1
vote
1answer
1k views

How to make a method synchronized across all instances of an object

Today I was asked this interview question and could not answer. : If you have two instances of a Person Object and each of them have a setAddres method that is synchronized. Now if it was only one ...
23
votes
5answers
2k views

Does immutability entirely eliminate the need for locks in multi-processor programming?

Part 1 Clearly Immutability minimizes the need for locks in multi-processor programming, but does it eliminate that need, or are there instances where immutability alone is not enough? It seems to ...
14
votes
8answers
15k views

Multithreading synchronization interview question: Find n words given m threads

I came across this question: You are given a paragraph , which contain n number of words, you are given m threads. What you need to do is , each thread should print one word and give the ...
2
votes
2answers
663 views

Multithreaded UI desktop application issues

I am involved into development a rich UI project: desktop windows application. Application uses asynchronous invocations and in its turn it should be ready to process external messages (events). The ...