1.

HandlePut(object o) performs what?(a) Fixing values(b) Locking(c) Changing values(d) UnlockingThe question was posed to me at a job interview.I'd like to ask this question from Multithreading topic in section Going Parallel, Handling Actuator and Sensor of IOT

Answer»

The correct choice is (d) Unlocking

Easiest explanation: void HandlePut(OBJECT o) method puts 0 into buffer. The new VALUE in the buffer replaces the old one. The method performs the necessary LOCKING to enable SAFE use of the buffer from multi THREADS.



Discussion

No Comment Found

Related InterviewSolutions