E&S CVS Commit: PEAK - Added first draft 'RLock' and 'ResourceManager' classes that implement the

pje at eby-sarna.com pje at eby-sarna.com
Mon Feb 24 16:27:00 EST 2003

Module Name:	PEAK
Committed By:	pje
Date:		Mon Feb 24 21:26:07 UTC 2003

Modified Files:
	PEAK/src/peak/util: threads.py

Log Message:
Added first draft 'RLock' and 'ResourceManager' classes that implement the
PEAK locking interface (attempt/obtain/release/locked) in a re-entrant
fashion for a single resource or an address space.  The idea is that we
will use a 'ResourceManager' to handle internal locks on addresses (such as
filenames) that refer to external resources, by calling
'someRM.obtain("some URI")' to lock the resource, etc.  The lockfiles in
'peak.running.lockfiles' should be changed to use this approach, so that
even independent lockfile instances share the same actual threadlock.
Also, we can use this when we begin implementing filesystem DM's (such as
the one we need for writing XMI files).

None of this code is tested; we really need a good unit test suite for
the entire 'threads' module.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 PEAK/src/peak/util/threads.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the source-changes mailing list