Пример #1
0
        public bool Start()
        {
            ActionThread.Start();
            TimeoutThread.Start();

            ThreadSynchronizer.WaitOne();

            ThreadSynchronizer.Close();
            return(_success);
        }
Пример #2
0
    /// <summary>
    /// If the action takes longer than the wait limit, this will throw a TimeoutException
    /// </summary>
    public void Start()
    {
        ActionThread.Start();
        TimeoutThread.Start();

        ThreadSynchronizer.WaitOne();

        if (!_success)
        {
            throw new TimeoutException();
        }
        ThreadSynchronizer.Close();
    }
Пример #3
0
        /// <summary>
        /// If the action takes longer than the wait limit, this will throw a TimeoutException
        /// </summary>
        public bool Start()
        {
            ActionThread.Start();
            TimeoutThread.Start();

            ThreadSynchronizer.WaitOne();

            if (!_success)
            {
                // throw new TimeoutException();
                ActionThread.Abort();
            }
            ThreadSynchronizer.Close();
            return(_success);
        }