Bangalore wrote:
Hi,
Plz, clarify me , with the differences between advisory lock
and mandatory locks.
Thnanks in advance
Bangalore.
(reposting. Comcast's news feed is fubar)
Advisory locks don't prevent you from accessing the data without
a lock. Mandatory locks do. Advisory locking depends on threads
or processes behaving properly and only accessing the data when
holding a lock.
In order for mandatory locks to be able to be enforcable, there
has to be a mechansim to control all access to the data. In OO
programming that would be by making the data private and only
accessable through method calls. The method implementations would
be responsible for determining whether locking was in effect and
enforcing it properly.
--
Joe Seigh
When you get lemons, you make lemonade.
When you get hardware, you make software.