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

Added has started, which adds way to check, whether CSSFX has been st… #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FlorianKirmaier
Copy link
Contributor

…arted. Useful to check whether it's active in a production environment, without relying on JVM-Arguments.

…arted. Useful to check whether it's active in a production environment, without relying on JVM-Arguments.
Comment on lines +46 to +51
private static boolean isGlobalCssFXStarted = false;

private static boolean isAnyCssFXStarted = false;


private static BooleanProperty cssFXStarted = new SimpleBooleanProperty(false);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of keeping several states? isn't only one enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isGlobalCssFXStarted prevents starting CSSFX.start() twice - which would end in twice as many listeners.

isAnyCssFXStarted just tells us, whether CSSFX was started in any way.

It's worth noting, that It's not really possible to start CSSFX.

Comment on lines +233 to +234
cssFXStarted.set(true);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we lack a cleanup of this state change during stop action

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stop mechanism doesn't really work.
The listener still stays active.
And it's not really used in any application I know of.
So I would rather suggest removing the stop method.

@FlorianKirmaier
Copy link
Contributor Author

@McFoggy
Can I get a version with this improvement?
It's important to me, so Writing a UI showing whether CSSFX was started somehow is easy.
Because now, I have to investigate the HeapDump, to find out whether CSSFX was started somewhere by accident.

@McFoggy
Copy link
Owner

McFoggy commented Mar 16, 2023

@FlorianKirmaier I have simplified your work in #47 please have a look.

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

Successfully merging this pull request may close these issues.

2 participants