controls-kt/docs/uml/sync-to-async.puml
2021-04-05 17:41:36 +03:00

23 lines
442 B
Plaintext

@startuml
title Transform synchronous to asynchronous
participant Synchronous
participant Adapter
participant Asynchronous
activate Synchronous
Synchronous -> Adapter: call and block
deactivate Synchronous
activate Adapter
Adapter -> Asynchronous: message with ID
hnote over Adapter : create a waiting thread
Asynchronous -> Adapter: message with ID
Adapter -> Synchronous: return result
deactivate Adapter
activate Synchronous
@enduml