E&S CVS Commit: PEAK - Implemented boolean operations on 'events.IConditional' objects, and added

pje at eby-sarna.com pje at eby-sarna.com
Sun Jan 25 21:45:01 EST 2004


Module Name:	PEAK
Committed By:	pje
Date:		Mon Jan 26 02:44:10 UTC 2004

Modified Files:
	PEAK: TODO.txt
	PEAK/src/peak/events: interfaces.py sources.py
	PEAK/src/peak/events/tests: test_events.py

Log Message:
Implemented boolean operations on 'events.IConditional' objects, and added
'isTrue' and 'isFalse' event sources to 'IValue' objects.  So now you can
do things like 'yield aCondition & otherCondition' to wait until two
conditions are true.  Unfortunately, it is possible to have a race
condition if some code sets 'aCondition' to true before setting
'otherCondition' to false, in that as soon as both are true, the waiting
thread would resume.  Sometimes this is what you want, and sometimes not.
I'm beginning to wonder if one needs a sort of "transactionality" to
events, so that one can set a variety of values or conditions, and *then*
allow the callbacks to fire.  But that will require some further thought.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/TODO.txt.diff?r1=1.102&r2=1.103
http://cvs.eby-sarna.com/PEAK/src/peak/events/interfaces.py.diff?r1=1.11&r2=1.12
http://cvs.eby-sarna.com/PEAK/src/peak/events/sources.py.diff?r1=1.7&r2=1.8
http://cvs.eby-sarna.com/PEAK/src/peak/events/tests/test_events.py.diff?r1=1.8&r2=1.9

To generate a diff of this commit:
cvs rdiff -r1.102 -r1.103 PEAK/TODO.txt
cvs rdiff -r1.11 -r1.12 PEAK/src/peak/events/interfaces.py
cvs rdiff -r1.7 -r1.8 PEAK/src/peak/events/sources.py
cvs rdiff -r1.8 -r1.9 PEAK/src/peak/events/tests/test_events.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