posted 20 years ago
Hey, Anton:
I am trying to clear my mind: in lockRecord, sync is on the map of locked record. It that recNo is already in the map, then that thread in book of business logic will go to wait for the locker. If it is not, then the thread will obtain that locker and other thread won't lock on it. Ooh, even though the lockRecord exits its sync block, the locked map already booked it and this is how it reaches atomic op in business layer. Thanks, Anton.
One more, how did you implement sync on modifiable operation at DB access: record level or database level, or simply the file pointer? I implemented on the database level, and would like to know if this will result deduction of marks.
--------<br />Andy Zhu<br />scjp 1.4<br />scjd 1.4<br />SAS Certified Programmer 9.0