5 instantiations of SemaphoreSlim
mscorlib (1)
system\io\stream.cs (1)
67
return LazyInitializer.EnsureInitialized(ref _asyncActiveSemaphore, () => new
SemaphoreSlim
(1, 1));
System (3)
net\System\Net\WebSockets\WebSocketBase.cs (1)
115
m_SendFrameThrottle = new
SemaphoreSlim
(1, 1);
sys\system\collections\concurrent\BlockingCollection.cs (2)
243
m_freeNodes = new
SemaphoreSlim
(boundedCapacity - collectionCount);
247
m_occupiedNodes = new
SemaphoreSlim
(collectionCount);
System.Data (1)
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (1)
222
SemaphoreSlim semaphore = new
SemaphoreSlim
(1);
56 references to SemaphoreSlim
mscorlib (52)
system\io\bufferedstream.cs (7)
352
SemaphoreSlim
sem = _this.EnsureAsyncActiveSemaphoreInitialized();
587
SemaphoreSlim
sem = base.EnsureAsyncActiveSemaphoreInitialized();
688
SemaphoreSlim
sem = base.EnsureAsyncActiveSemaphoreInitialized();
796
SemaphoreSlim
sem = base.EnsureAsyncActiveSemaphoreInitialized();
1015
SemaphoreSlim
sem = base.EnsureAsyncActiveSemaphoreInitialized();
1099
SemaphoreSlim
sem = base.EnsureAsyncActiveSemaphoreInitialized();
1245
SemaphoreSlim
sem = base.EnsureAsyncActiveSemaphoreInitialized();
system\io\stream.cs (4)
61
private
SemaphoreSlim
_asyncActiveSemaphore;
63
internal
SemaphoreSlim
EnsureAsyncActiveSemaphoreInitialized()
325
var
semaphore = EnsureAsyncActiveSemaphoreInitialized();
471
var
semaphore = EnsureAsyncActiveSemaphoreInitialized();
system\security\cryptography\cryptostream.cs (2)
351
var
sem = base.EnsureAsyncActiveSemaphoreInitialized();
606
var
sem = base.EnsureAsyncActiveSemaphoreInitialized();
system\threading\SemaphoreSlim.cs (39)
35
/// The <see cref="
SemaphoreSlim
"/> provides a lightweight semaphore class that doesn't
39
/// All public and protected members of <see cref="
SemaphoreSlim
"/> are thread-safe and may be used
41
/// must only be used when all other operations on the <see cref="
SemaphoreSlim
"/> have
107
/// Gets the current count of the <see cref="
SemaphoreSlim
"/>.
109
/// <value>The current count of the <see cref="
SemaphoreSlim
"/>.</value>
122
/// the <see cref="
SemaphoreSlim
"/> itself, nor does it decrement the semaphore's
127
/// cref="
SemaphoreSlim
"/> has been disposed.</exception>
156
/// Initializes a new instance of the <see cref="
SemaphoreSlim
"/> class, specifying
169
/// Initializes a new instance of the <see cref="
SemaphoreSlim
"/> class, specifying
203
/// Blocks the current thread until it can enter the <see cref="
SemaphoreSlim
"/>.
214
/// Blocks the current thread until it can enter the <see cref="
SemaphoreSlim
"/>, while observing a
230
/// Blocks the current thread until it can enter the <see cref="
SemaphoreSlim
"/>, using a <see
236
/// <returns>true if the current thread successfully entered the <see cref="
SemaphoreSlim
"/>;
256
/// Blocks the current thread until it can enter the <see cref="
SemaphoreSlim
"/>, using a <see
265
/// <returns>true if the current thread successfully entered the <see cref="
SemaphoreSlim
"/>;
286
/// Blocks the current thread until it can enter the <see cref="
SemaphoreSlim
"/>, using a 32-bit
291
/// <returns>true if the current thread successfully entered the <see cref="
SemaphoreSlim
"/>;
302
/// Blocks the current thread until it can enter the <see cref="
SemaphoreSlim
"/>,
309
/// <returns>true if the current thread successfully entered the <see cref="
SemaphoreSlim
"/>; otherwise, false.</returns>
479
/// Asynchronously waits to enter the <see cref="
SemaphoreSlim
"/>.
488
/// Asynchronously waits to enter the <see cref="
SemaphoreSlim
"/>, while observing a
504
/// Asynchronously waits to enter the <see cref="
SemaphoreSlim
"/>,
512
/// the <see cref="
SemaphoreSlim
"/>, otherwise with a result of false.
525
/// Asynchronously waits to enter the <see cref="
SemaphoreSlim
"/>, using a <see
538
/// the <see cref="
SemaphoreSlim
"/>, otherwise with a result of false.
553
/// Asynchronously waits to enter the <see cref="
SemaphoreSlim
"/>, using a <see
562
/// the <see cref="
SemaphoreSlim
"/>, otherwise with a result of false.
583
/// Asynchronously waits to enter the <see cref="
SemaphoreSlim
"/>,
593
/// the <see cref="
SemaphoreSlim
"/>, otherwise with a result of false.
738
/// Exits the <see cref="
SemaphoreSlim
"/> once.
740
/// <returns>The previous count of the <see cref="
SemaphoreSlim
"/>.</returns>
749
/// Exits the <see cref="
SemaphoreSlim
"/> a specified number of times.
752
/// <returns>The previous count of the <see cref="
SemaphoreSlim
"/>.</returns>
755
/// <exception cref="T:System.Threading.SemaphoreFullException">The <see cref="
SemaphoreSlim
"/> has
843
/// cref="
SemaphoreSlim
"/>.
846
/// Unlike most of the members of <see cref="
SemaphoreSlim
"/>, <see cref="Dispose()"/> is not
862
/// Unlike most of the members of <see cref="
SemaphoreSlim
"/>, <see cref="Dispose(Boolean)"/> is not
888
SemaphoreSlim
semaphore = obj as
SemaphoreSlim
;
System (3)
net\System\Net\WebSockets\WebSocketBase.cs (1)
43
private readonly
SemaphoreSlim
m_SendFrameThrottle;
sys\system\collections\concurrent\BlockingCollection.cs (2)
61
private
SemaphoreSlim
m_freeNodes;
62
private
SemaphoreSlim
m_occupiedNodes;
System.Data (1)
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (1)
222
SemaphoreSlim
semaphore = new SemaphoreSlim(1);