Ejemplo n.º 1
0
        public bool Start()
        {
            ActionThread.Start();
            TimeoutThread.Start();

            ThreadSynchronizer.WaitOne();

            ThreadSynchronizer.Close();
            return(_success);
        }
Ejemplo n.º 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();
    }
Ejemplo n.º 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);
        }