eliom
eliom copied to clipboard
Make timeout the default for pathless services
The eliom manual states about pathless services: "Warning: forgetting timeouts may cause memory leaks! ". This probably means that pathless services would be better with a default timeout (say, 300s, configurable through the conf. file) and the option to either set a different timeout or have a timeoutless service.
I.e.:
- create => 300s timeout
- create ~timeout:(Days 1) => 1 day timeout
- create ~timeout:NoTimeout => no timeout (is this really useful?).
Pathless services are very commonly created statically, in which case no timeout applies. I think the most common use case for pathless services is actions that can happen anywhere in the application, and are available throughout the application lifetime. See for example the pathless services in Ocsigen Start.