[Modelinterpreter] [Model Interpreter] #248: Change runtime event queue and termination condition

Boldizsár Németh nboldi at caesar.elte.hu
Fri Jun 19 20:43:34 CEST 2015


Sziasztok!

Nekem korrektnek tűnik ez az elvárás.
Egy kérdés: ha egy state machine csak simán kifogy az eventekből de nem 
ér el terminálási állapotot, akkor ott beragad, és amíg ott van addig a 
rendszer sem terminál, ha jól értem. Tehát célszerű lesz úgy átírni a 
példákat, hogy terminálási állapotba jussanak.
Gergő, te mit gondolsz?

Boldi

On 2015.06.19. 12:14, modelinterpreter-trac at plc.inf.elte.hu wrote:
> #248: Change runtime event queue and termination condition
> --------------------------+----------------------------
>   Reporter:  kmate         |      Owner:  nboldi
>       Type:  defect        |     Status:  new
>   Priority:  major         |  Milestone:  2015-06 (June)
> Component:  Code_Runtime  |    Version:
>   Keywords:                |
> --------------------------+----------------------------
>   Currently the runtime uses a simple linked list with a queue interface to
>   represent the event queue of the state machine(s) in a single component.
>   When the queue gets empty, the runtime terminates immediately. This
>   behavior should be modified as follows:
>
>   - The event queue should be a blocking data structure, which suspends the
>   dispatching thread until an event arrives (eg.
>   [https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/LinkedBlockingDeque.html
>   LinkedBlockingDeque])
>   - The runtime must terminate only after all active class instances are
>   destroyed. A class is active when it has a state machine, and it could be
>   destroyed in two ways:
>       - its state machine reaches a final pseudo state
>       - it is destroyed explicitly from action code (to be supported later)
>   - An instance registry could watch for these destructions and terminate
>   the runtime if there are no more active class instances in it
>   - As there is no concurrency in a single component, the blocking of the
>   event handler queue is not a problem, as the destruction of an active
>   class is always executed before the queue will be checked again for more
>   events
>



More information about the Modelinterpreter mailing list