@startuml hide footbox participant "E20 main thread" as main participant "tdm thread" as sub sub <-- : a synchronous event activate sub --> main: a synchronous event activate main sub -> sub: calling thread callbacks in tdm-thread activate sub deactivate sub sub --> main: sending a synchronous event sub -> sub: pthread_cond_wait activate sub main -> main: calling thread callbacks in main-thread activate main deactivate main main --> sub: sending a synchronous event main -> main: pthread_cond_wait activate main deactivate sub deactivate main deactivate main deactivate sub ... (DEADLOCK) ... note over main, sub * 만약 main-thread, tdm-thread에서 동시에 synchronous event가 발생되게 되면 deadlock발생됨 - 양쪽에서 모두 pthread_cond_wait에서 대기 * sync event는 한쪽 thread에서만 발생되도록 보장되어야 함. - tdm-thread -> main-thread방향으로만 sync event전달만 허용 * sync event의 종류 - backend에서 스스로 발생되는 event들만 가능 - output status변경중에 connection/disconnection, virtual output creation/destruction end note @enduml