To my understanding, for any request, the server is to invoke the continuation that produces the response exactly once - so why does lsp not do that by itself? It seems unnecessary to give the user the freedom to drop the continuation or even invoke it multiple times.
I guess one could indeed come up with an example where you want to put the continuation in a work queue or something like that but I expect that lsp itself should have better insight on when to actually invoke the continuation than any user of the library? Or you could just provide a hook where all IO actions that fire a response go through?
To my understanding, for any request, the server is to invoke the continuation that produces the response exactly once - so why does
lspnot do that by itself? It seems unnecessary to give the user the freedom to drop the continuation or even invoke it multiple times.I guess one could indeed come up with an example where you want to put the continuation in a work queue or something like that but I expect that
lspitself should have better insight on when to actually invoke the continuation than any user of the library? Or you could just provide a hook where all IO actions that fire a response go through?