MCA Logo
MCA Online Reference Documentation
Main Index

5.4. Accessing blackboard content without locking

Accessing blackboard without locking is dangerous as then single values may be changed at the moment of reading and there is a possibility that data is corrupt. Usually writing and reading elements is done within Lock/Unlock blocks.

Nevertheless there are exceptions, where accessing blackboard content without locking is necessarry and clever. The user is then responsible for correct updating originals and copies using the functions ReadUpdate/NonLockingReadUpdate to transfer data from original to copy, WriteElement to increment the write counter of an element, and of course the normal Lock/Unlock functions whenever data is to be written.

The tLogReadStream and tLogWriteStream classes are examples of a pair, which accesses blackboard content in such a way.