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