Applied planned changes to the Waitable class; Waitable class now has a Wait() method that can be used instead of the WaitHandle; publicized Waitable's members to deriving classes so they don't have to duplicate them when doing a custom implementation; virtualized all Methods to allow a custom Waitable implementation to completely provide its own methods of Waiting, determining the Ended state and registering to the AsyncEnded event

git-svn-id: file:///srv/devel/repo-conversion/nusu@77 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2008-06-11 20:06:23 +00:00
parent 26365177dd
commit df860b8e57
3 changed files with 68 additions and 22 deletions

View file

@ -33,6 +33,18 @@ Design using interfaces:
/// <summary>Whether the background process has finished</summary>
bool Finished { get; }
// ?
/// <summary>Wait handle that can be used to wait for multiple waitables</summary>
/// <remarks>
/// Only use the WaitHandle to wait if you're running in a different thread than
/// the request, or you may deadlock. Libraries based on single-threaded
/// multitasking may employ concepts such as window message processing to achieve
/// parallelism which could be stalled by improper waiting using the WaitHandle
/// whereas the Wait() method typically has a suitable implementation compatible
/// with the request's requirements.
/// </remarks>
WaitHandle WaitHandle { get; }
}
interface IThreadedWaitable : IWaitable {