SpinLock.Exit Método
Definição
Libera o bloqueio.Releases the lock.
Sobrecargas
| Exit() |
Libera o bloqueio.Releases the lock. |
| Exit(Boolean) |
Libera o bloqueio.Releases the lock. |
Exit()
Libera o bloqueio.Releases the lock.
public:
void Exit();
public void Exit ();
member this.Exit : unit -> unit
Public Sub Exit ()
Exceções
O acompanhamento de propriedade de thread está habilitado e o thread atual não é o proprietário deste bloqueio.Thread ownership tracking is enabled, and the current thread is not the owner of this lock.
Comentários
A sobrecarga padrão de Exit fornece o mesmo comportamento que se estiver chamando Exit usando true como o argumento.The default overload of Exit provides the same behavior as if calling Exit using true as the argument.
Se você chamar Exit sem precisar primeiro chamar Enter o estado interno do SpinLock pode ser corrompido.If you call Exit without having first called Enter the internal state of the SpinLock can become corrupted.
Aplica-se a
Exit(Boolean)
Libera o bloqueio.Releases the lock.
public:
void Exit(bool useMemoryBarrier);
public void Exit (bool useMemoryBarrier);
member this.Exit : bool -> unit
Public Sub Exit (useMemoryBarrier As Boolean)
Parâmetros
- useMemoryBarrier
- Boolean
Um valor booliano que indica se um limite de memória deve ser emitido para publicar imediatamente a operação de saída em outros threads.A Boolean value that indicates whether a memory fence should be issued in order to immediately publish the exit operation to other threads.
Exceções
O acompanhamento de propriedade de thread está habilitado e o thread atual não é o proprietário deste bloqueio.Thread ownership tracking is enabled, and the current thread is not the owner of this lock.
Comentários
Chamar Exit com o useMemoryBarrier argumento definido como true melhorará a imparcialidade do bloqueio às custas de algum desempenho.Calling Exit with the useMemoryBarrier argument set to true will improve the fairness of the lock at the expense of some performance. A Exit sobrecarga padrão se comporta como se especificar true para useMemoryBarrier .The default Exit overload behaves as if specifying true for useMemoryBarrier.
Se você chamar Exit sem precisar primeiro chamar Enter o estado interno do SpinLock pode ser corrompido.If you call Exit without having first called Enter the internal state of the SpinLock can become corrupted.