posted on Sunday, December 11, 2005 5:19 PM
by
andrewwhitten
Keeping an object alive in a Console application
It seemed pretty simple task... have a console application
run as a service in the background, and do so on both .Net 2.0 and Compact
Framework 2.0 ...
Well, I couldn't seem to find a good way apart from having an infinite while
loop after my object, keeping it alive forever..
Tim Gerken (No link, but I'm pretty sure this guy) helped me out by suggesting
I use the System.Threading.AutoResetEvent
synchronization object, which will hold the current thread for me until which
time I choose to release it.