Files
Yggdrasil/legacy_docs/infotro/PTR/XF.md
T
Klagarge b78f79e12e docs: move legacy docs to legacy_docs/
Assisted-by: Delta:zai-glm-5.3
2026-10-10 20:28:25 +02:00

1.2 KiB

XF

Services

Reactive

@startuml

participant MainLand as main
participant Queue as queue
participant Behavior as behavior
participant XF as xf

main -> behavior: push(event)
behavior -> queue: add(event)

xf -> xf: dispatchEvent()
activate xf
xf -> queue : getEvent()
queue --> xf
xf -> behavior: processEvent()
deactivate xf

@enduml

Timeout

@startuml

participant TimerQueue as tq #cyan
participant Timeout as t #LawnGreen
participant TimeoutManager as tm #cyan
participant EventQueue as eq #cyan
participant MainLand as main #cyan
participant Reactive as r #yellow

r ->> tm: scheduleTimeout(tmid, evid, duration)
activate r #magenta
deactivate r

create t
tm -->> t: <<create>>
tm ->> tq: add(tm) <<synchronized>>
tm ->> tq: tick()
tq ->> t: decrement()
tm ->> tq: tick()
tq ->> t: decrement()

tm ->> eq: pushEvent(tm) <<synchronized>>
tm ->> tq: remove(id) <<synchronized>>

main ->> eq: popEvent() <<synchronized>>
activate main #yellow
eq -->> main: ev
main ->> t: getTarget()
t -->> main: reactive
main ->> r: processEvent(ev)
activate r #magenta
r -->> main
deactivate r
main -->> t !!: <<destroy>>

@enduml

Protection

  • Mutex, sémaphore
  • éviter les conflits mémoire