Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChitImpl.AlreadyDisposed is premature optimization #5

Open
nedtwigg opened this issue Mar 17, 2021 · 0 comments
Open

ChitImpl.AlreadyDisposed is premature optimization #5

nedtwigg opened this issue Mar 17, 2021 · 0 comments

Comments

@nedtwigg
Copy link
Member

Probably slows things down with slower dispatch. Should definitely remove this, and consider making Chit a class with final methods.

static final class AlreadyDisposed implements Chit {
@Override
public boolean isDisposed() {
return true;
}
@Override
public void runWhenDisposed(Runnable whenDisposed) {
whenDisposed.run();
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant