You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.
// provided by root-most layer, akin to IApplicationEnvironment// dependency-injected into hosting layer to subscribe to shutdownrequested token// dependency-injected into file watcher or other low-level components// which have a reason to request process shutdown
IApplicationShutdown
{// called by subsystems that wish to initiate a graceful shutdown.// typical callers include file watcher// expect to return immediately.voidRequestShutdown();// token triggered the first time RequestShutdown is called// typical observers include helios or self-host's "main" method// expected behavior is to return from "main" which will result in// the rest of the tear-down sequence occuring// including triggering IHttpApplicationLifecycle events// and ultimately process termination or recyclingCancelationTokenShutdownRequested{get;}}// provided by web-hosting layer// dependency-injected into frameworks or applications// which have a reason to observe or delay the shutdown sequence// the shutdown sequence cannot be cancelled
IApplicationLifetime
{// triggered by the web application host, either as a result of // ShutdownRequested token being triggered, or some other intrinsic reason.// http requests may still be in flight when this token is triggered.// the host should wait for all event handlers to return before proceeding.CancelationTokenApplicationStopping{get;}// triggered by the web application host, either as a result of // ShutdownRequested token being triggered, or some other intrinsic reason.// http requests will be entirely completed when this token is triggered.// the host should wait for all event handlers to return before proceeding.CancelationTokenApplicationStopped{get;}}
inside Microsoft.AspNet.Hosting's Program.Main
the primary thread should block on a wait handle
the wait handle should be signalled by ShutdownRequested triggering
in a second thread there should be a call to Console.ReadLine()
and when Console.ReadLine() returns it should call RequestShutdown()
when the IDisposable returned by IHostingEngine.Start is Dispose()ed
it should immediately signal the ApplicationStopping token
then should call the weblistener server's idisposable dispose method
which should stop accepting requests if it hasn't already
and wait for all requests in flight to drain
and then return from the weblistener's disponse
then should signal ApplicationStopped token
then return from Dispose
In the Helios case, the IDisposable returned by IHostingEngine.Start should be Dispose()ed
it should immediately signal the ApplicationStopping token
then should call the helios' iserverfactory's start idisposable dispose method
which should stop accepting requests if it hasn't already
and wait for all requests in flight to drain
and then return from the iserverfactory.start's idisponsable.dispose
then should signal ApplicationStopped token
then return from Dispose
The text was updated successfully, but these errors were encountered:
Note: Helios will need the ability to provide its own file system watcher; it can't use the generic that's used in self host scenarios. It's the same reason System.Web provides its own implementation rather than using the built-in classes. Hosting will need to provide a way to disable the built-in one and allow the actual host to provide its own.
Relates to #18 and Helios
inside Microsoft.AspNet.Hosting's Program.Main
the primary thread should block on a wait handle
the wait handle should be signalled by ShutdownRequested triggering
in a second thread there should be a call to Console.ReadLine()
and when Console.ReadLine() returns it should call RequestShutdown()
when the IDisposable returned by IHostingEngine.Start is Dispose()ed
it should immediately signal the ApplicationStopping token
then should call the weblistener server's idisposable dispose method
which should stop accepting requests if it hasn't already
and wait for all requests in flight to drain
and then return from the weblistener's disponse
then should signal ApplicationStopped token
then return from Dispose
In the Helios case, the IDisposable returned by IHostingEngine.Start should be Dispose()ed
it should immediately signal the ApplicationStopping token
then should call the helios' iserverfactory's start idisposable dispose method
which should stop accepting requests if it hasn't already
and wait for all requests in flight to drain
and then return from the iserverfactory.start's idisponsable.dispose
then should signal ApplicationStopped token
then return from Dispose
The text was updated successfully, but these errors were encountered: