-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose run_result_t
publicly
#106
Comments
We could expose the alias certainly. The actual Making it movable should be a simple case of adding |
I've just finished implementing this so I'll open a pr and we can discuss it there? I like the idea of some kind of session naming, but for that I suggest we move more of Edit: |
Ah, unfortunate timing. I just closed this and opened #107 :p Shall we discuss over there? |
Related to #106 and #107. * feat: make controller_run_result movable * chore: improve tests slightly * fix: accidental removal of m_workguard from controller_run_result This actually was informative because it showed how m_workguard actually does matter. See if there is no work guard, and the user calls run() on a _client_ controller, then enough time elapses so that all work is complete and there is a pause before new work is added, the io_context::run() will return for each of the threads, meaning that in actual fact queuing more actions via the controller (which is valid after calling start) would not actually do anything. tl;dr nasty obscure bug, keep the workguard its needed for clients * feat: add start_result alias to controllers * coding style * chore: start_result -> session * chore: server::controller -> server::routing_context * chore: server/controller -> server/routing_context * fix: tests include * fix: more rename fixes * fix: session test * fix example server/applications/demo01 Co-authored-by: Joel Bodenmann <jbo@insane.engineer>
@0x00002a A typical consuming application of
malloy::server
would usestart()
to create a "session" and then destroys it when the server is supposed to be shutdown. In our examples we're currently just relying on the returnedrun_result_t
object to go out of scope which will automatically shut down themalloy::server
infrastructure.Currently, unless I am missing something, there is no way for a consuming application to properly store the
run_result_t
object as a class member as we're not exposing therun_result_t
type publicly.Is there some caveat I'm currently not aware of or can we expose that type publicly so a consuming application could have a class member like
std::optional<run_result_t>
to control the state of themalloy
server?The text was updated successfully, but these errors were encountered: