dasMulli / dotnet-win32-service

Helper classes to set up and run as windows services directly on .net core. A ServiceBase alternative.
MIT License
451 stars 57 forks source link

Deprecate RunAsync due to issues with win api in continuations. #46

Closed dasMulli closed 7 years ago

dasMulli commented 7 years ago

Turns out windows API doesn't like to be called from background threads. This can be a problem when Run() or RunAsync() is called from a background thread. Since RunAsync() encourages such usage but the implementation of RunAsync() blocks for most of its run anyway, obsolete and hide it.