Closed avsm closed 9 years ago
Agreed, but I assume you mean App.start
. App.run
[1] doesn't call Lwt_min.run
https://github.com/rgrinberg/opium/blob/master/rock/opium_rock.ml#L111
Although I have to make sure that the generated cmdliner command is aware of any custom initializations made (if you choose to use that)
OK so App.start
will no longer call Lwt_main.run
for you as it's been pushed to run_command
.
I will take a look at how to make the generated cmdliner more customizable.
I see what you mean about cmdliner. I'm working around it with the released version with two Lwt_main.run
loops (which works, but feels risky), and will switch over to tracking Opium trunk.
You may now use App.run_command'
and launch the lwt event loop yourself to work around this.
I've got some Lwt actions to run in order to setup my handlers (a db connection to Irmin). It would be useful to decouple
App.run
from actually doingLwt_main.run
, as that would let me compose a few initialisation actions and then runLwt_main.run
on the result.