erlang - When should one do Synchronous or Asynchronous sending? -
synchronous call : The call that will send an answer is expected.
asynchronous call : calls that will send (block current process)
Although I understand the concept of sync and async , But when it comes to converting these concepts, I usually fail.
Indicates how Deadlock can be avoided to sync calls to send the ADC Call Call with other processes and send data to themselves.
My question: How can one person choose sync or asynchronous calls while creating a real world application in ARLing / OTP.
Rule of my thumb:
-
-> Use asynchronous message
-
-> If your process requires a result and can not do it, some synchronous messages (easy to read) can be used. >
-> If your process requires a result and you should not do anything use synchronous calls in use
Comments
Post a Comment