Is there any way in topshelf to run multiple hosts in a single executable?
// Create hosts
var h1 = HostFactory.New (...); var h2 = HostFactory.New (...)
// Start hosts
in one application Runner.Run (h1, h2);
Edit
Solved using threads. But not sure if it is safe ...
new Thread (()=>Runner.Run (h1));
new Thread (()=>Runner.Run (h2));
source
share