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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="Mutex" FullName="System.Threading.Mutex">
<TypeSignature Maintainer="auto" Language="C#" Value="public sealed class Mutex : System.Threading.WaitHandle" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit Mutex extends System.Threading.WaitHandle" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Threading.WaitHandle</BaseTypeName>
</Base>
<Interfaces>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When two or more threads need to access a shared resource at the same time, the system needs a synchronization mechanism to ensure that only one thread at a time uses the resource. <see cref="T:System.Threading.Mutex" /> is a synchronization primitive that grants exclusive access to the shared resource to only one thread. If a thread acquires a mutex, the second thread that wants to acquire that mutex is suspended until the first thread releases the mutex.</para>
<para>You can use the <see cref="M:System.Threading.WaitHandle.WaitOne(System.Int32,System.Boolean)" /> method to request ownership of a mutex. The thread that owns a mutex can request the same mutex in repeated calls to <see cref="Overload:System.Threading.WaitHandle.WaitOne" /> without blocking its execution. However, the thread must call the <see cref="M:System.Threading.Mutex.ReleaseMutex" /> method the same number of times to release ownership of the mutex. The <see cref="T:System.Threading.Mutex" /> class enforces thread identity, so a mutex can be released only by the thread that acquired it. By contrast, the <see cref="T:System.Threading.Semaphore" /> class does not enforce thread identity. </para>
<para>If a thread terminates while owning a mutex, the mutex is said to be abandoned. The state of the mutex is set to signaled, and the next waiting thread gets ownership. Beginning in version 2.0 of the .NET Framework, an <see cref="T:System.Threading.AbandonedMutexException" /> is thrown in the next thread that acquires the abandoned mutex. Before version 2.0 of the .NET Framework, no exception was thrown.</para>
<block subset="none" type="note">
<para>An abandoned mutex often indicates a serious error in the code. When a thread exits without releasing the mutex, the data structures protected by the mutex might not be in a consistent state. The next thread to request ownership of the mutex can handle this exception and proceed, if the integrity of the data structures can be verified. </para>
</block>
<para>In the case of a system-wide mutex, an abandoned mutex might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager).</para>
<para>Mutexes are of two types: local mutexes, which are unnamed, and named system mutexes. A local mutex exists only within your process. It can be used by any thread in your process that has a reference to the <see cref="T:System.Threading.Mutex" /> object that represents the mutex. Each unnamed <see cref="T:System.Threading.Mutex" /> object represents a separate local mutex.</para>
<para>Named system mutexes are visible throughout the operating system, and can be used to synchronize the activities of processes. You can create a <see cref="T:System.Threading.Mutex" /> object that represents a named system mutex by using a constructor that accepts a name. The operating-system object can be created at the same time, or it can exist before the creation of the <see cref="T:System.Threading.Mutex" /> object. You can create multiple <see cref="T:System.Threading.Mutex" /> objects that represent the same named system mutex, and you can use the <see cref="Overload:System.Threading.Mutex.OpenExisting" /> method to open an existing named system mutex.</para>
<block subset="none" type="note">
<para>On a server that is running Terminal Services, a named system mutex can have two levels of visibility. If its name begins with the prefix "Global\", the mutex is visible in all terminal server sessions. If its name begins with the prefix "Local\", the mutex is visible only in the terminal server session where it was created. In that case, a separate mutex with the same name can exist in each of the other terminal server sessions on the server. If you do not specify a prefix when you create a named mutex, it takes the prefix "Local\". Within a terminal server session, two mutexes whose names differ only by their prefixes are separate mutexes, and both are visible to all processes in the terminal server session. That is, the prefix names "Global\" and "Local\" describe the scope of the mutex name relative to terminal server sessions, not relative to processes.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A synchronization primitive that can also be used for interprocess synchronization. </para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Mutex ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue />
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Calling this constructor overload is the same as calling the <see cref="M:System.Threading.Mutex.#ctor(System.Boolean)" /> constructor overload and specifying false for initial ownership of the mutex. That is, the calling thread does not own the mutex.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Threading.Mutex" /> class with default properties.</para>
</summary>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Mutex (bool initiallyOwned);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool initiallyOwned) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue />
<Parameters>
<Parameter Name="initiallyOwned" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Threading.Mutex" /> class with a Boolean value that indicates whether the calling thread should have initial ownership of the mutex.</para>
</summary>
<param name="initiallyOwned">
<attribution license="cc4" from="Microsoft" modified="false" />true to give the calling thread initial ownership of the mutex; otherwise, false. </param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Mutex (bool initiallyOwned, string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool initiallyOwned, string name) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue />
<Parameters>
<Parameter Name="initiallyOwned" Type="System.Boolean" />
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If <paramref name="name" /> is not null and <paramref name="initiallyOwned" /> is true, the calling thread owns the mutex only if the named system mutex was created as a result of this call. Since there is no mechanism for determining whether the named system mutex was created, it is better to specify false for <paramref name="initiallyOwned" /> when calling this constructor overload. You can use the <see cref="M:System.Threading.Mutex.#ctor(System.Boolean,System.String,System.Boolean@)" /> constructor if you need to determine initial ownership.</para>
<para>This constructor initializes a <see cref="T:System.Threading.Mutex" /> object that represents a named system mutex. You can create multiple <see cref="T:System.Threading.Mutex" /> objects that represent the same named system mutex.</para>
<para>If the named mutex has already been created with access control security, and the caller does not have <see cref="F:System.Security.AccessControl.MutexRights.FullControl" />, an exception is thrown. To open an existing named mutex with only those permissions needed for synchronizing thread activities, see the <see cref="Overload:System.Threading.Mutex.OpenExisting" /> method.</para>
<para>If you specify null or an empty string for <paramref name="name" />, a local mutex is created, as if you had called the <see cref="M:System.Threading.Mutex.#ctor(System.Boolean)" /> constructor. In this case, <paramref name="createdNew" /> is always true.</para>
<para>Because they are system-wide, named mutexes can be used to coordinate resource use across process boundaries.</para>
<block subset="none" type="note">
<para>On a server that is running Terminal Services, a named system mutex can have two levels of visibility. If its name begins with the prefix "Global\", the mutex is visible in all terminal server sessions. If its name begins with the prefix "Local\", the mutex is visible only in the terminal server session where it was created. In that case, a separate mutex with the same name can exist in each of the other terminal server sessions on the server. If you do not specify a prefix when you create a named mutex, it takes the prefix "Local\". Within a terminal server session, two mutexes whose names differ only by their prefixes are separate mutexes, and both are visible to all processes in the terminal server session. That is, the prefix names "Global\" and "Local\" describe the scope of the mutex name relative to terminal server sessions, not relative to processes.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Threading.Mutex" /> class with a Boolean value that indicates whether the calling thread should have initial ownership of the mutex, and a string that is the name of the mutex.</para>
</summary>
<param name="initiallyOwned">
<attribution license="cc4" from="Microsoft" modified="false" />true to give the calling thread initial ownership of the named system mutex if the named system mutex is created as a result of this call; otherwise, false. </param>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the <see cref="T:System.Threading.Mutex" />. If the value is null, the <see cref="T:System.Threading.Mutex" /> is unnamed. </param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Mutex (bool initiallyOwned, string name, out bool createdNew);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool initiallyOwned, string name, bool createdNew) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue />
<Parameters>
<Parameter Name="initiallyOwned" Type="System.Boolean" />
<Parameter Name="name" Type="System.String" />
<Parameter Name="createdNew" Type="System.Boolean&" RefType="out" />
</Parameters>
<Docs>
<param name="initiallyOwned">To be added: an object of type 'bool'</param>
<param name="name">To be added: an object of type 'string'</param>
<param name="createdNew">To be added: an object of type 'bool&'</param>
<summary>To be added</summary>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Mutex (bool initiallyOwned, string name, out bool createdNew, System.Security.AccessControl.MutexSecurity mutexSecurity);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool initiallyOwned, string name, bool createdNew, class System.Security.AccessControl.MutexSecurity mutexSecurity) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="initiallyOwned" Type="System.Boolean" />
<Parameter Name="name" Type="System.String" />
<Parameter Name="createdNew" Type="System.Boolean&" RefType="out" />
<Parameter Name="mutexSecurity" Type="System.Security.AccessControl.MutexSecurity" />
</Parameters>
<Docs>
<param name="initiallyOwned">To be added.</param>
<param name="name">To be added.</param>
<param name="createdNew">To be added.</param>
<param name="mutexSecurity">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
</Member>
<Member MemberName="GetAccessControl">
<MemberSignature Language="C#" Value="public System.Security.AccessControl.MutexSecurity GetAccessControl ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Security.AccessControl.MutexSecurity GetAccessControl() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Security.AccessControl.MutexSecurity</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Threading.Mutex.GetAccessControl" /> method uses the following combination of flags (combined using the bitwise OR operation) to search for permissions: <see cref="F:System.Security.AccessControl.AccessControlSections.Access" />, <see cref="F:System.Security.AccessControl.AccessControlSections.Owner" />, and <see cref="F:System.Security.AccessControl.AccessControlSections.Group" />.</para>
<para>The user must have <see cref="F:System.Security.AccessControl.MutexRights.ReadPermissions" /> to call this method, and the mutex must have been opened with <see cref="F:System.Security.AccessControl.MutexRights.ReadPermissions" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a <see cref="T:System.Security.AccessControl.MutexSecurity" /> object that represents the access control security for the named mutex.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <see cref="T:System.Security.AccessControl.MutexSecurity" /> object that represents the access control security for the named mutex.</para>
</returns>
</Docs>
</Member>
<Member MemberName="OpenExisting">
<MemberSignature Language="C#" Value="public static System.Threading.Mutex OpenExisting (string name);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Mutex OpenExisting(string name) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Mutex</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="Overload:System.Threading.Mutex.OpenExisting" /> method tries to open the specified named system mutex. If the system mutex does not exist, this method throws an exception instead of creating the system object. To create the system mutex when it does not already exist, use one of the <see cref="M:System.Threading.Mutex.#ctor(System.Boolean,System.String)" /> constructors that has a <paramref name="name" /> parameter.</para>
<para>Multiple calls to this method that use the same value for <paramref name="name" /> do not necessarily return the same <see cref="T:System.Threading.Mutex" /> object, even though the objects that are returned represent the same named system mutex. </para>
<para>This method overload is equivalent to calling the <see cref="M:System.Threading.Mutex.OpenExisting(System.String,System.Security.AccessControl.MutexRights)" /> method overload and specifying <see cref="F:System.Security.AccessControl.MutexRights.Synchronize" /> and <see cref="F:System.Security.AccessControl.MutexRights.Modify" /> rights, combined by using the bitwise OR operation. </para>
<para>Specifying the <see cref="F:System.Security.AccessControl.MutexRights.Synchronize" /> flag allows a thread to wait on the mutex, and specifying the <see cref="F:System.Security.AccessControl.MutexRights.Modify" /> flag allows a thread to call the <see cref="M:System.Threading.Mutex.ReleaseMutex" /> method.</para>
<para>This method does not request ownership of the mutex. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Opens the specified named mutex, if it already exists.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An object that represents the named system mutex.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the system mutex to open.</param>
</Docs>
</Member>
<Member MemberName="OpenExisting">
<MemberSignature Language="C#" Value="public static System.Threading.Mutex OpenExisting (string name, System.Security.AccessControl.MutexRights rights);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Mutex OpenExisting(string name, valuetype System.Security.AccessControl.MutexRights rights) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Mutex</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="rights" Type="System.Security.AccessControl.MutexRights" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <paramref name="rights" /> parameter must include the <see cref="F:System.Security.AccessControl.MutexRights.Synchronize" /> flag to allow threads to wait on the mutex, and the <see cref="F:System.Security.AccessControl.MutexRights.Modify" /> flag to allow threads to call the <see cref="M:System.Threading.Mutex.ReleaseMutex" /> method. </para>
<para>The <see cref="Overload:System.Threading.Mutex.OpenExisting" /> method tries to open an existing named mutex. If the system mutex does not exist, this method throws an exception instead of creating the system object. To create the system mutex when it does not already exist, use one of the <see cref="M:System.Threading.Mutex.#ctor(System.Boolean,System.String)" /> constructors that has a <paramref name="name" /> parameter.</para>
<para>Multiple calls to this method that use the same value for <paramref name="name" /> do not necessarily return the same <see cref="T:System.Threading.Mutex" /> object, even though the objects that are returned represent the same named system mutex. </para>
<para>This method does not request ownership of the mutex. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Opens the specified named mutex, if it already exists, with the desired security access.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An object that represents the named system mutex.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the system mutex to open.</param>
<param name="rights">
<attribution license="cc4" from="Microsoft" modified="false" />A bitwise combination of the enumeration values that represent the desired security access.</param>
</Docs>
</Member>
<Member MemberName="ReleaseMutex">
<MemberSignature Language="C#" Value="public void ReleaseMutex ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void ReleaseMutex() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A thread that owns a mutex can specify the same mutex in repeated wait function calls without blocking its execution. The number of calls is kept by the common language runtime. The thread must call <see cref="M:System.Threading.Mutex.ReleaseMutex" /> the same number of times to release ownership of the mutex. </para>
<para>If a thread terminates while owning a mutex, the mutex is said to be abandoned. The state of the mutex is set to signaled and the next waiting thread gets ownership. If no one owns the mutex, the state of the mutex is signaled. Beginning in version 2.0 of the .NET Framework, an <see cref="T:System.Threading.AbandonedMutexException" /> is thrown in the next thread that acquires the mutex. Prior to version 2.0 of the .NET Framework, no exception was thrown.</para>
<block subset="none" type="note">
<para>An abandoned mutex often indicates a serious error in the code. When a thread exits without releasing the mutex, the data structures protected by the mutex might not be in a consistent state. The next thread to request ownership of the mutex can handle this exception and proceed, if the integrity of the data structures can be verified. </para>
</block>
<para>In the case of a system-wide mutex, an abandoned mutex might indicate that an application has been terminated abruptly (for example, by using Windows Task Manager).</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Releases the <see cref="T:System.Threading.Mutex" /> once.</para>
</summary>
</Docs>
</Member>
<Member MemberName="SetAccessControl">
<MemberSignature Language="C#" Value="public void SetAccessControl (System.Security.AccessControl.MutexSecurity mutexSecurity);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetAccessControl(class System.Security.AccessControl.MutexSecurity mutexSecurity) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="mutexSecurity" Type="System.Security.AccessControl.MutexSecurity" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The user must have <see cref="F:System.Security.AccessControl.MutexRights.ChangePermissions" /> rights to call this method, and the mutex must have been opened with <see cref="F:System.Security.AccessControl.MutexRights.ChangePermissions" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the access control security for a named system mutex.</para>
</summary>
<param name="mutexSecurity">
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Security.AccessControl.MutexSecurity" /> object that represents the access control security to be applied to the named system mutex.</param>
</Docs>
</Member>
<Member MemberName="TryOpenExisting">
<MemberSignature Language="C#" Value="public static bool TryOpenExisting (string name, out System.Threading.Mutex result);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool TryOpenExisting(string name, class System.Threading.Mutex result) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="result" Type="System.Threading.Mutex&" RefType="out" />
</Parameters>
<Docs>
<param name="name">To be added.</param>
<param name="result">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TryOpenExisting">
<MemberSignature Language="C#" Value="public static bool TryOpenExisting (string name, System.Security.AccessControl.MutexRights rights, out System.Threading.Mutex result);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool TryOpenExisting(string name, valuetype System.Security.AccessControl.MutexRights rights, class System.Threading.Mutex result) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="rights" Type="System.Security.AccessControl.MutexRights" />
<Parameter Name="result" Type="System.Threading.Mutex&" RefType="out" />
</Parameters>
<Docs>
<param name="name">To be added.</param>
<param name="rights">To be added.</param>
<param name="result">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
|