ThreadState Enumeração
Definição
Especifica o estado de execução atual do thread.Specifies the current execution state of the thread.
public enum class ThreadState
public enum ThreadState
type ThreadState =
Public Enum ThreadState
- Herança
Campos
| Initialized | 0 | Um estado que indica que o thread foi inicializado, mas ainda não foi iniciado.A state that indicates the thread has been initialized, but has not yet started. |
| Ready | 1 | Um estado que indica que o thread está esperando para usar um processador porque não há nenhum processador livre.A state that indicates the thread is waiting to use a processor because no processor is free. O thread está preparado para ser executado no próximo processador disponível.The thread is prepared to run on the next available processor. |
| Running | 2 | Um estado que indica que o thread está usando um processador no momento.A state that indicates the thread is currently using a processor. |
| Standby | 3 | Um estado que indica que o thread está prestes a usar um processador.A state that indicates the thread is about to use a processor. Apenas um thread pode estar nesse estado por vez.Only one thread can be in this state at a time. |
| Terminated | 4 | Um estado que indica que o thread concluiu a execução e foi encerrado.A state that indicates the thread has finished executing and has exited. |
| Transition | 6 | Um estado que indica que o thread está esperando um recurso, que não um processador, antes de poder ser executado.A state that indicates the thread is waiting for a resource, other than the processor, before it can execute. Por exemplo, podem estar esperando sua pilha de execução ser paginada do disco.For example, it might be waiting for its execution stack to be paged in from disk. |
| Unknown | 7 | O estado do thread é desconhecido.The state of the thread is unknown. |
| Wait | 5 | Um estado que indica que o thread não está pronto para usar o processador porque está esperando uma operação periférica ser concluída ou um recurso ficar livre.A state that indicates the thread is not ready to use the processor because it is waiting for a peripheral operation to complete or a resource to become free. Quando o thread estiver pronto, ele será reagendado.When the thread is ready, it will be rescheduled. |
Comentários
Importante
Há duas enumerações de estado de thread System.Diagnostics.ThreadState e System.Threading.ThreadState .There are two thread state enumerations, System.Diagnostics.ThreadState and System.Threading.ThreadState. As enumerações de estado de thread são apenas de interesse em alguns cenários de depuração.The thread state enumerations are only of interest in a few debugging scenarios. O código nunca deve usar o estado do thread para sincronizar as atividades de threads.Your code should never use thread state to synchronize the activities of threads.