Improve synchronous messaging, i.e., make timeouts for synchronous response handlers optional #51

Closed
Neverlord opened this Issue Aug 15, 2012 · 1 comment

1 participant

@Neverlord
CAF: C++ Actor Framework member

Currently, receiving a synchronous response always requires a timeout specification. This is because the following cases were guaranteed to be deadlocks otherwise:

  • sync_send to a terminated actor
  • sync_send to an actor that finishes execution afterwards without handling the message
  • request forwarding, e.g., by an actor proxy, with one of the two previously mentioned cases

The runtime system might send a special kind of message in such cases to inform the sender that its message was dropped. In order to do this, the runtime system needs to have the ability to check whether a mailbox is "closed". Furthermore, a terminating actor must scan its mailbox for unreplied-to messages after closing it.

By implementing the mentioned improvement, the only remaining deadlock scenario is an actor that does not have a matching handler defined in its current behavior. However, it is the responsibility of application developers to prevent such deadlocks and libcppa would not have to enforce timeout definitions for synchronous response handlers.

@Neverlord
CAF: C++ Actor Framework member

Feature is implemented in the unstable branch and will be merged to master soon.

@Neverlord Neverlord closed this Feb 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment