Now, create the object of service (e.g. hello_service) before server.start() as pre-condition, but create the object of service is not necessary if service is not called.
It can be supported that allow user creates the object of service while the service is called.
for example, pass one function create() to register_handler().
Search before asking
What happened + What you expected to happen
https://github.com/alibaba/yalantinglibs/blob/c75fdff50b43a153b9f86a50cafea060487e21e7/src/coro_rpc/examples/helloworld/server/main.cpp#L22-L38
Now, create the object of service (e.g.
hello_service
) beforeserver.start()
as pre-condition, but create the object of service is not necessary if service is not called.It can be supported that allow user creates the object of service while the service is called.
for example, pass one function
create()
toregister_handler()
.Reproduction way
Anything else
Are you willing to submit a PR?