Exemple #1
0
        /// <summary>
        /// Wait until the specified object is not busy
        /// (IsBusy is false).
        /// </summary>
        /// <param name="obj">Target object.</param>
        /// <param name="timeout">Timeout value.</param>
        public static void WaitOne(INotifyBusy obj, TimeSpan timeout)
        {
            BusyLocker locker = new BusyLocker(obj, timeout);

            locker.WaitOne();
        }
Exemple #2
0
 /// <summary>
 /// Wait until the specified object is not busy 
 /// (IsBusy is false).
 /// </summary>
 /// <param name="obj">Target object.</param>
 /// <param name="timeout">Timeout value.</param>
 public static void WaitOne(INotifyBusy obj, TimeSpan timeout)
 {
   BusyLocker locker = new BusyLocker(obj, timeout);
   locker.WaitOne();
 }
Exemple #3
0
        /// <summary>
        /// Wait until the specified object is not busy
        /// (IsBusy is false).
        /// </summary>
        /// <param name="obj">Target object.</param>
        public static void WaitOne(INotifyBusy obj)
        {
            BusyLocker locker = new BusyLocker(obj, TimeSpan.FromMilliseconds(Timeout.Infinite));

            locker.WaitOne();
        }
Exemple #4
0
 /// <summary>
 /// Wait until the specified object is not busy 
 /// (IsBusy is false).
 /// </summary>
 /// <param name="obj">Target object.</param>
 public static void WaitOne(INotifyBusy obj)
 {
   BusyLocker locker = new BusyLocker(obj, TimeSpan.FromMilliseconds(Timeout.Infinite));
   locker.WaitOne();
 }