This class provides a shared file to several threads. Only one thread
at a time can use the file. To acquire the file a thread has to
request it in a blocking call to
acquireFile(OnReleaseRequestCallback)
.
The provided callback is optional and is used to notify the owning thread
when another one wants to acquire the file. In case a release is requested
the thread owning the file must release it as soon as possible. If no
callback is provided a thread that acquires the file must release it
as soon as possible, i.e. even if callback was provided the thread cannot
have the file for less time.