Udostępnij za pośrednictwem


AsyncPackage.Initialize Method

Definition

Seal this method. Due to an almost unavoidable risk of deadlock, SetSite (which is what calls Initialize) still occurs on the UI thread even for async package. Since most async package authors would, logically, assume that Initialize happens on a b/g thread they may do expensive (synchronous) things inside of their override, defeating some of the benefit of async loads. To help lead them away from that we will seal it and thus all they can override is async initialize, which is called on the b/g thread.

protected:
 override void Initialize();
protected:
 override sealed void Initialize();
 override sealed void Initialize();
protected override sealed void Initialize ();
override this.Initialize : unit -> unit
Protected Overrides NotOverridable Sub Initialize ()

Applies to