Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Expose IApplicationShutdown interface from ApplicationHost #104

Closed
davidfowl opened this issue Apr 17, 2014 · 0 comments
Closed

Expose IApplicationShutdown interface from ApplicationHost #104

davidfowl opened this issue Apr 17, 2014 · 0 comments

Comments

@davidfowl
Copy link
Member

Related to aspnet/Hosting#23

// 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
[AssemblyNeutral]
public interface IApplicationShutdown
{
  // called by subsystems that wish to initiate a graceful shutdown.
  // typical callers include file watcher
  // expect to return immediately.
  void RequestShutdown();

  // 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 recycling
  CancellationToken ShutdownRequested {get;}
}
@davidfowl davidfowl added this to the Alpha milestone Apr 17, 2014
@davidfowl davidfowl self-assigned this Apr 17, 2014
@davidfowl davidfowl modified the milestones: Post Alpha, Alpha May 14, 2014
@davidfowl davidfowl modified the milestones: CTP2, Post Alpha May 24, 2014
@glennc glennc closed this as completed May 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants