コード例 #1
0
            public void run()
            {
                _count.incrementAndGet();

                _latch.waitForAllToStart();
                _latch.finish();
            }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void handle(String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
            public override void handle(string target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
            {
                response.ContentType = "text/plain; charset=utf-8";
                response.Status      = HttpServletResponse.SC_OK;
                PrintWriter @out = response.Writer;

                writeBatch(@out, _firstBatchSize);
                @out.flush();
                _latch.start();
                _innerBarrier.reached();

                _latch.finish();
                writeBatch(@out, _otherBatchSize);
                baseRequest.Handled = true;
            }
コード例 #3
0
 internal virtual void StartWriteThread()
 {
     (new Thread(() =>
     {
         DoubleLatch.start();
         try
         {
             using (Transaction tx = Db.beginTx())
             {
                 Db.createNode(Label.label("VeryUniqueLabel"));
                 tx.success();
             }
         }
         catch (Exception e)
         {
             ExceptionsInProcedure.Add(e);
         }
         finally
         {
             DoubleLatch.finish();
         }
     })).Start();
 }
コード例 #4
0
 public override void Close(bool populationCompletedSuccessfully)
 {
     Delegate.close(populationCompletedSuccessfully);
     assertTrue("Expected population to succeed :(", populationCompletedSuccessfully);
     Latch.finish();
 }
コード例 #5
0
 public void run()
 {
     _lastJobExecuted.set(true);
     _latch.finish();
 }
コード例 #6
0
 public override void Stop()
 {
     Latch.finish();
 }