Search Results for

    Show / Hide Table of Contents

    Class ThreadUtil

    Summary description for ThreadUtil.

    Inheritance
    System.Object
    ThreadUtil
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: ImageVault.Common.Lib.Threading
    Assembly: ImageVault.Common.dll
    Syntax
    public static class ThreadUtil
    Remarks

    2011-05-13 dan: Created

    Methods

    AbortThreadIfRunning(Thread)

    Aborts the supplied thread if it is running

    Declaration
    public static bool AbortThreadIfRunning(Thread thread)
    Parameters
    Type Name Description
    System.Threading.Thread thread

    The System.Threading.Thread to abort

    Returns
    Type Description
    System.Boolean

    True if the thread is stopped, false if abort failed after timeout

    StartThread(ThreadStart, Action<Exception>)

    Creates and starts a thread

    Declaration
    public static Thread StartThread(ThreadStart threadStart, Action<Exception> exceptionHandler = null)
    Parameters
    Type Name Description
    System.Threading.ThreadStart threadStart

    The System.Threading.ThreadStart to use

    System.Action<System.Exception> exceptionHandler

    An System.Action<T> handling an exception for the threadStart

    Returns
    Type Description
    System.Threading.Thread

    The running System.Threading.Thread

    Exceptions
    Type Condition
    System.ArgumentNullException

    If threadStart is null.

    In This Article
    Back to top (c) Meriworks 2002-2022