Integrate vibe.d into Windows Service

Andre Pany andre at s-e-a-p.de
Fri Nov 23 18:11:11 UTC 2018


On Wednesday, 21 November 2018 at 15:05:31 UTC, Kagamin wrote:
> Start vibe in another thread and return from ServiceMain, see 
> https://docs.microsoft.com/en-us/windows/desktop/Services/service-servicemain-function also ideally you should report running state only after vibe initialized, opened sockets and started listening, before that it's not really running.

I tried to wrap WaitForSingleObject into a Fiber by using command 
runTask. In theory it should work fine but the service (app) just 
crash without any information on an empty runTask function.

Also calling listenHTTP crashes the service. Here I am able to 
catch the Error "eventcore.core static constructor didn't run!?".

I created a github issue with complete source code here 
https://github.com/vibe-d/vibe-core/issues/105

Kind regards
Andre


More information about the Digitalmars-d-learn mailing list