0
votes
2answers
53 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
702 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 ...
13
votes
8answers
11k 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 ...
1
vote
2answers
612 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 ...