notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r1926 - development/main/planet/components/fsm/demo/trafficlight/src/main/net/dpml/fsm/trafficlight
- From: niclas AT netcompartner.com
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r1926 - development/main/planet/components/fsm/demo/trafficlight/src/main/net/dpml/fsm/trafficlight
- Date: Wed, 02 Mar 2005 06:00:04 +0100
Author: niclas
Date: Wed Mar 2 06:00:03 2005
New Revision: 1926
Modified:
development/main/planet/components/fsm/demo/trafficlight/src/main/net/dpml/fsm/trafficlight/Timer.java
Log:
Timing issue in the startup + mixup in my head on the wait(0) semantics.
Modified:
development/main/planet/components/fsm/demo/trafficlight/src/main/net/dpml/fsm/trafficlight/Timer.java
==============================================================================
---
development/main/planet/components/fsm/demo/trafficlight/src/main/net/dpml/fsm/trafficlight/Timer.java
(original)
+++
development/main/planet/components/fsm/demo/trafficlight/src/main/net/dpml/fsm/trafficlight/Timer.java
Wed Mar 2 06:00:03 2005
@@ -114,20 +114,21 @@
*/
public void run()
{
- m_run = true;
- String command = "next";
- m_stateMachine.reset( m_initial );
- m_nextWait = 100;
- m_stateMachine.addTransitionListener( this, null );
try
{
+ m_run = true;
+ String command = "next";
+ Thread.sleep( 200 );
+ m_stateMachine.reset( m_initial );
+ m_nextWait = 1;
+ m_stateMachine.addTransitionListener( this, null );
while( m_run )
{
synchronized( this )
- {
+ {
wait( m_nextWait );
- m_stateMachine.trigger( this, command );
- }
+ m_stateMachine.trigger( this, command );
+ }
}
}
catch( InterruptedException e )
- svn commit: r1926 - development/main/planet/components/fsm/demo/trafficlight/src/main/net/dpml/fsm/trafficlight, niclas, 03/02/2005
Archive powered by MHonArc 2.6.24.