forked from madelson/DistributedLock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeadlockException.cs
More file actions
31 lines (27 loc) · 1.32 KB
/
Copy pathDeadlockException.cs
File metadata and controls
31 lines (27 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
namespace Medallion.Threading
{
/// <summary>
/// An exception that SOME distributed locks will throw under SOME deadlock conditions. Note that even locks
/// that throw this exception under some circumstances cannot detect ALL deadlock conditions
/// </summary>
[Serializable]
public sealed class DeadlockException
// for backwards compat
: InvalidOperationException
{
/// <summary>
/// Constructs a new instance of <see cref="DeadlockException"/> with a default message
/// </summary>
public DeadlockException() : this("A deadlock occurred") { }
/// <summary>
/// Constructs an instance of <see cref="DeadlockException"/> with the given <paramref name="message"/>
/// </summary>
public DeadlockException(string message) : base(message) { }
/// <summary>
/// Constructs an instance of <see cref="DeadlockException"/> with the given <paramref name="message"/> and <paramref name="innerException"/>
/// </summary>
public DeadlockException(string message, Exception innerException) : base(message, innerException) { }
private DeadlockException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
}
}