Re-added the default exception handler which will now re-throw the exception, thereby mimicking the behavior of .NET's ThreadPool; wrote unit test to verify the default exception handler is working
git-svn-id: file:///srv/devel/repo-conversion/nusu@179 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
273eb9885c
commit
3c10f05589
2 changed files with 24 additions and 3 deletions
|
|
@ -249,6 +249,19 @@ namespace Nuclex.Support {
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests whether the afine thread pool's default exception handler works
|
||||
/// as expected
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestDefaultExceptionHandler() {
|
||||
Assert.Throws<ArrayTypeMismatchException>(
|
||||
delegate() {
|
||||
AffineThreadPool.ExceptionHandler(new ArrayTypeMismatchException("Test"));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that the waiting work items count and active thread count are
|
||||
/// updated by the thread pool.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue