rpc result type is allowed to be a future

Issue #78 resolved
Amir Kamil created an issue

The current preconditions for rpc require that std::result_of<Func(Args...)>::type be Serializable. However, the description states that a future is legal, in which case the rpc will wait until the returned future is ready before sending its value as the result of the rpc. Thus, the preconditions should minimally be modified to allow std::result_of<Func(Args...)>::type to be a future<T> where T is Serializable.

The actual description implicitly allows a future<T...> where T... may consist of an arbitrary number of types. We should either restrict this or allow a future<T...> where all the types in T... must be Serializable.

Comments (3)

  1. Former user Account Deleted

    I think changing the wording for serializable only to apply to T and not future<T> is straightforward. We should also allow for future<T...> with all T... serializable.

  2. Log in to comment