Giter VIP home page Giter VIP logo

cafe-latte's People

Contributors

axkr avatar easye avatar phoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cafe-latte's Issues

Test entering each control flow structure multiple times

Currently each test makes a new set of instances at each execution; this kills efficiency because ideally you would only instantiate e.g. a Tagbody or a HandlerCase once and then call out to it.

We need tests that verify that each control flow structure can be entered multiple times by the same thread. In the future, also check its reentrancy.

Optimize block/tagbody stack search

There is no need to check the stack for blocks and tagbodies - we should be able to use a true-initialized boolean variable instead and set it to false when the block/tagbody goes out of scope.

Avoid creating stack trace for ControlFlowException?

As I understand your flow control exceptions, the stack trace is not needed for debugging or similar purposes:

See: https://www.baeldung.com/java-exceptions-performance

so you can override fillInStackTrace in Throwable (or make it configurable with a global flag?)

 @Override
  public synchronized Throwable fillInStackTrace() { 
      return this;
  }

IgnoreErrors: return two values

@Test
public void ignoreErrorsNoTransferTest() {
Condition returnValue = ignoreErrors(() -> {});
assertNull(returnValue);
}
@Test
public void ignoreErrorsTransferTest() {
Error error = new Error();
Condition returnValue = ignoreErrors(() -> {
signal(error);
});
assertNotNull(returnValue);
assertEquals(returnValue, error);
}

This should return a pair of a nullable return value and a nullable error to better map to the CL API.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.