Examples of take()


Examples of EDU.oswego.cs.dl.util.concurrent.BoundedLinkedQueue.take()

      // Help to recycle
      for (int i = 0; i < q1.size(); i++)
      {
         try
         {
            q1.take();
         }
         catch (InterruptedException e)
         {
            e.printStackTrace();
         }
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.Slot.take()

      Object o = slot.poll(5000);
      assertNull(o);

      // exit the valve
      valve.leave();
      o = slot.take();
      assertNotNull(o);
      assertEquals("CLOSED", o);
   }

   public void testSimpleClose2() throws Exception
View Full Code Here

Examples of EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.take()

                                return pos % 80 == 0 ? '\n' : '.';
                            } else if (pos == blobLength) {
                                try {
                                    sync.put("x");
                                    // deleted
                                    sync.take();
                                } catch (InterruptedException e) {
                                    e.printStackTrace();
                                }
                                return 'x';
                            }
View Full Code Here

Examples of cc.redberry.core.indexmapping.MappingsPort.take()

            long start = System.currentTimeMillis();
            for (int i = 0; i < 1000; ++i) {
                MappingsPort mp = IndexMappings.createPort(riman1, riman2);
                IndexMappingBuffer buffera;
                while ((buffera = mp.take()) != null);
            }
            time += System.currentTimeMillis() - start;
        }
        return time;
    }
View Full Code Here

Examples of cc.redberry.core.math.frobenius.FrobeniusSolver.take()

        FrobeniusSolver fbSolver = new FrobeniusSolver(lowCounts, upCounts);

        //processing combinations
        int u, l;
        int[] combination;
        while ((combination = fbSolver.take()) != null) {

            List<Tensor> tCombination = new ArrayList<>();
            u = 0;
            l = 0;
            for (i = 0; i < combination.length; ++i)
View Full Code Here

Examples of cc.redberry.core.solver.frobenius.FrobeniusSolver.take()

        //processing combinations
        int u, l;
        int[] combination;
        SumBuilder result = new SumBuilder();
        while ((combination = fbSolver.take()) != null) {

            List<Tensor> tCombination = new ArrayList<>();
            u = 0;
            l = 0;
            for (i = 0; i < combination.length; ++i)
View Full Code Here

Examples of cc.redberry.core.tensorgenerator.SymbolsGenerator.take()

                if (!tensorSubstitutions.containsKey(split.factor)) {
                    //map does not contains rule for current scalar (e.g. k_{i}*k^{i})
                    Tensor s;
                    //adding new rule for the scalar, e.g. k_{i}*k^{i} = scalar2
                    tensorSubstitutions.put(split.factor, s = generator.take());
                    //replacing this scalar with symbol
                    iterator.set(Tensors.multiply(s, split.summand));
                } else
                    //map is already contains rule for current scalar
                    //replacing this scalar with symbol from map
View Full Code Here

Examples of cc.redberry.core.transformations.substitutions.ProductsBijectionsPort.take()

            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null) {
                for (int i = 0; i < bijection.length; ++i)
                    if (bijection[i] != i)
                        continue OUTER;
                good = true;
                break;
View Full Code Here

Examples of cc.redberry.transformation.substitutions.n.ProductsBijectionsPort.take()

            int[] bijection;
            boolean good = false;
            int trys = 0;
            OUTER:
            while (trys++ < 5000 && (bijection = port.take()) != null) {
                for (int i = 0; i < bijection.length; ++i)
                    if (bijection[i] != i)
                        continue OUTER;
                good = true;
                break;
View Full Code Here

Examples of com.astamuse.asta4d.render.concurrent.ConcurrentRenderHelper.take()

            ConcurrentRenderHelper crHelper = ConcurrentRenderHelper.getInstance(context, doc);
            String delcaration = null;
            if (crHelper.hasUnCompletedTask()) {
                delcaration = null;
                try {
                    FutureRendererHolder holder = crHelper.take();
                    delcaration = holder.getRenderDeclaration();
                    String ref = holder.getSnippetRefId();
                    String reSelector = SelectorUtil.attr(ExtNodeConstants.SNIPPET_NODE_TAG_SELECTOR, ExtNodeConstants.ATTR_SNIPPET_REF,
                            ref);
                    Element element = doc.select(reSelector).get(0);// must have
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.