I ran into the issue that even though daemon=TRUE the session would hang on a request, but only when done within R. After some head scratching I realized that this is because although the server is running asynchronously, it is still within the same single threaded process as the console, so there is no way that the two can talk to each other. So in order to do this the server must be started in a new process. I've added to the documentation and will be submitting a pull request momentarily.
I would be glad if this is accepted in some form, because running into this can lead to some unneeded frustration. Of course, make any changes you feel are appropriate, or ask me to do so, or that it should be put elsewhere. I put the documentation into the documentation for the daemon parameter in server_config() because that is where I figured out how to start in daemon mode, so I'm guessing that people with my use case will read that part of the docs.
Thanks for the servr package, it is super helpful!
I ran into the issue that even though
daemon=TRUE
the session would hang on a request, but only when done within R. After some head scratching I realized that this is because although the server is running asynchronously, it is still within the same single threaded process as the console, so there is no way that the two can talk to each other. So in order to do this the server must be started in a new process. I've added to the documentation and will be submitting a pull request momentarily.I would be glad if this is accepted in some form, because running into this can lead to some unneeded frustration. Of course, make any changes you feel are appropriate, or ask me to do so, or that it should be put elsewhere. I put the documentation into the documentation for the
daemon
parameter inserver_config()
because that is where I figured out how to start in daemon mode, so I'm guessing that people with my use case will read that part of the docs.Thanks for the
servr
package, it is super helpful!