ray c8cdfbeab1 I read some of Chapter 17, but started to go cross-eyed. I did get to
the part about volatile variables, and that led me to this simpler
implementation.

Interval is no longer Runnable (good because it won't tempt people to post
the interval themselves), and I got rid of the less-than-sweet _fired
and _expired variables. The trade off? schedule() and cancel() are
synchronized, not a big deal, and the task needs to check if it is
being run on the dispatch thread, which shouldn't be a big deal.
The major plus is that the code is easier to understand.
The same amount of objects are created, and we don't do anything silly
like create a new object every time the interval fires.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1556 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2004-12-22 23:56:54 +00:00
2003-03-27 00:19:52 +00:00
S
Description
Samskivert Library
15 MiB
Languages
Java 96.5%
Shell 2.2%
HTML 1.3%