reader_lock


Description:

public void reader_lock ()

Locks this for reading.

Note:

Use reader_lock instead

There may be unlimited concurrent locks for reading of a StaticRWLock at the same time. If this is already locked for writing by another thread or if another thread is already waiting to lock this for writing, this function will block until this is unlocked by the other writing thread and no other writing threads want to lock this. This lock has to be unlocked by reader_unlock.

StaticRWLock is not recursive. It might seem to be possible to recursively lock for reading, but that can result in a deadlock, due to writer preference.

Parameters:

this

a StaticRWLock to lock for reading.