Semaphore was initialized twice if its two-parameter constructor was used - fixed

git-svn-id: file:///srv/devel/repo-conversion/nusu@184 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2009-11-03 20:01:59 +00:00
parent 53f29b87a0
commit 4d772fb498

View File

@ -80,8 +80,7 @@ namespace Nuclex.Support {
/// <param name="maximumCount">
/// Maximum numbr of users that can access the resource at the same time
/// </param>
public Semaphore(int initialCount, int maximumCount)
: this() {
public Semaphore(int initialCount, int maximumCount) {
if(initialCount > maximumCount) {
throw new ArgumentOutOfRangeException(
"initialCount", "Initial count must not be larger than the maximum count"
@ -158,7 +157,6 @@ namespace Nuclex.Support {
}
#if XBOX360
/// <summary>
/// Waits for the resource to become available and locks it
/// </summary>
@ -169,7 +167,6 @@ namespace Nuclex.Support {
public override bool WaitOne() {
return WaitOne(-1, false);
}
#endif
#if !XBOX360