Skip to content

RpcResult improvements #27

@eigen-value

Description

@eigen-value

For const-correctness and thread safety of RpcResult objects

  • .result code should be better locked by an object level mutex / an atomic cas that guarantees the single execution
  • RpcResult template should hold the returned RType result so that multiple calls return the same result by ref It can't be done because .result is a template by design (eg what happens if it is called multiple times but with different types? .result(int) then .result(str) the effect would be undefined)
  • Document better

Minor, but preferred:

  • rename RpcResult as RpcCall
  • the object param error should be better initialized so that if it is accessed before the call is executed it is a self explanatory one like GENERIC_ERR with "RPC call not executed".
  • Check const-correctness of both RpcResult and Bridge

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions