top | item 45639726

(no title)

jhgg | 4 months ago

Risk of deadlock is real if you have processes calling each-other in a cyclic way. e.g. process A sends GenServer call to process B, that then sends a GenServer call to process A to in order to handle the original call. However, process A is busy waiting on B to reply to it's initial call.

This is rarely a problem in practice however.

discuss

order

oxidant|4 months ago

receive takes a timeout. A would crash/hit the timeout and deal with the problem.

jhgg|4 months ago

Yes, agreed, hence rarely a problem in practice ;)

innocentoldguy|4 months ago

Wouldn't you just `cast` instead of `call` if you thought this was going to be an issue?

signa11|4 months ago

you are not blocked on response right ?

worthless-trash|4 months ago

You can cast or call ( non blocking, or blocking) you can do either.