Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Thread Class
Thread Methods

  Switch on low bandwidth view
Members FilterMembers Filter
Frameworks FilterFrameworks Filter
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Thread Methods

The Thread type exposes the following members.

  NameDescription
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkAbortOverloaded. Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkAllocateDataSlotAllocates an unnamed data slot on all the threads. For better performance, use fields that are marked with the ThreadStaticAttribute attribute instead.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkAllocateNamedDataSlotAllocates a named data slot on all threads. For better performance, use fields that are marked with the ThreadStaticAttribute attribute instead.
Public methodStatic memberBeginCriticalRegionNotifies a host that execution is about to enter a region of code in which the effects of a thread abort or unhandled exception might jeopardize other tasks in the application domain.
Public methodStatic memberBeginThreadAffinityNotifies a host that managed code is about to execute instructions that depend on the identity of the current physical operating system thread.
Public methodStatic memberEndCriticalRegionNotifies a host that execution is about to enter a region of code in which the effects of a thread abort or unhandled exception are limited to the current task.
Public methodStatic memberEndThreadAffinityNotifies a host that managed code has finished executing instructions that depend on the identity of the current physical operating system thread.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkEquals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkFinalizeOverloaded.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkFreeNamedDataSlotEliminates the association between a name and a slot, for all threads in the process. For better performance, use fields that are marked with the ThreadStaticAttribute attribute instead.
Public methodGetApartmentStateReturns an ApartmentState value indicating the apartment state.
Public methodGetCompressedStack Obsolete. Returns a CompressedStack object that can be used to capture the stack for the current thread.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetDataRetrieves the value from the specified slot on the current thread, within the current thread's current domain. For better performance, use fields that are marked with the ThreadStaticAttribute attribute instead.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetDomainReturns the current domain in which the current thread is running.
Public methodStatic memberGetDomainIDReturns a unique application domain identifier.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetHashCodeOverloaded.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetNamedDataSlotLooks up a named data slot. For better performance, use fields that are marked with the ThreadStaticAttribute attribute instead.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkGetType Gets the Type of the current instance. (Inherited from Object.)
Public methodInterruptInterrupts a thread that is in the WaitSleepJoin thread state.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkJoinOverloaded. Blocks the calling thread until a thread terminates.
Protected methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkMemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkMemoryBarrierSynchronizes memory access as follows: The processor executing the current thread cannot reorder instructions in such a way that memory accesses prior to the call to MemoryBarrier execute after memory accesses that follow the call to MemoryBarrier.
Public methodStatic memberResetAbortCancels an Abort requested for the current thread.
Public methodResume Obsolete. Resumes a thread that has been suspended.
Public methodSetApartmentStateSets the apartment state of a thread before it is started.
Public methodSetCompressedStack Obsolete. Applies a captured CompressedStack to the current thread.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkSetDataSets the data in the specified slot on the currently running thread, for that thread's current domain. For better performance, use fields marked with the ThreadStaticAttribute attribute instead.
Public methodSupported by the XNA FrameworkSetProcessorAffinityIn the .NET Compact Framework for Xbox 360, sets the processor affinity for a managed thread. Processor affinity determines the processors on which a thread runs.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkSleepOverloaded. Blocks the current thread for the specified number of milliseconds.
Public methodStatic memberSpinWaitCauses a thread to wait the number of times defined by the iterations parameter.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkStartOverloaded. Causes a thread to be scheduled for execution.
Public methodSuspend Obsolete. Either suspends the thread, or if the thread is already suspended, has no effect.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkToString Returns a String that represents the current Object. (Inherited from Object.)
Public methodTrySetApartmentStateSets the apartment state of a thread before it is started.
Public methodStatic memberVolatileReadOverloaded. Reads the value of a field. The value is the latest written by any processor in a computer, regardless of the number of processors or the state of processor cache.
Public methodStatic memberVolatileWriteOverloaded. Writes a value to a field immediately, so that the value is visible to all processors in the computer.
Top
  NameDescription
Explicit interface implemetationPrivate method_Thread..::.GetIDsOfNamesMaps a set of names to a corresponding set of dispatch identifiers.
Explicit interface implemetationPrivate method_Thread..::.GetTypeInfoRetrieves the type information for an object, which can then be used to get the type information for an interface.
Explicit interface implemetationPrivate method_Thread..::.GetTypeInfoCountRetrieves the number of type information interfaces that an object provides (either 0 or 1).
Explicit interface implemetationPrivate method_Thread..::.InvokeProvides access to properties and methods exposed by an object.
Top
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
How can i track threads?      Shaak ... Thomas Lee   |   Edit   |   Show History

Hi,

I'd like to know how can i track threads being launched by thread or threadpool so i can abort/kill one or all if required without killing the main calling program. OS threads don't work because their IDs are different. My scenario has diffrent threads being launched by same name, how can i find out which one is which and then kill accordingly.

Thanks

[tfl - 29 Aug 08] You should post questions like this to the MSDN Forums at http://forums.microsoft.com/msdn or the MSDN Newsgroups at http://www.microsoft.com/communities/newsgroups/en-us/. You are much more likely get a quick response using the forums than through the Community Content.

For help on specific areas:
Visual Studio : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.vstudio%2C&
.NET Framework : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.dotnet.framework

Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker