コード例 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public Void call() throws Exception
            public override Void Call()
            {
                Runner = Thread.CurrentThread;
                StartLatch.await();
                Delegate.apply();
                return(null);
            }
コード例 #2
0
 /// <summary>
 /// Halts this flusher, making it stop flushing. The current call to <seealso cref="PageCache.flushAndForce()"/>
 /// will complete before exiting this method call. If there was an error in the thread doing the flushes
 /// that exception will be thrown from this method as a <seealso cref="System.Exception"/>.
 /// </summary>
 internal virtual void Halt()
 {
     _halted = true;
     _halt.await();
     if (_error != null)
     {
         throwIfUnchecked(_error);
         throw new Exception(_error);
     }
 }
コード例 #3
0
        public override void Stop()          // for removing throw declaration
        {
            if (_shutdownLatch == null)
            {
                return;                         // This SlaveUpdatePuller has already been shut down
            }

            Thread thread = _updatePullingThread;

            _halted = true;
            LockSupport.unpark(thread);
            _shutdownLatch.await();
            _shutdownLatch = null;
        }
コード例 #4
0
ファイル: ScheduledJobHandle.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void waitTermination() throws java.util.concurrent.ExecutionException, InterruptedException
        public override void WaitTermination()
        {
            _handleRelease.await();
            JobHandle handleDelegate = this._latestHandle;

            if (handleDelegate != null)
            {
                handleDelegate.WaitTermination();
            }
            if (get() == FAILED)
            {
                Exception exception = this._lastException;
                if (exception != null)
                {
                    throw new ExecutionException(exception);
                }
                else
                {
                    throw new CancellationException();
                }
            }
        }