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

Extract ThreadManager and introduce EngineStatus #1797

Merged
merged 5 commits into from
Jul 3, 2015

Conversation

immortius
Copy link
Member

First step of the engine lifecycle redux.

This step

  • moves threading related elements of the engine into a ThreadManagementSubsystem
  • introduces EngineStatus and EngineStatus subscription. This allowed the SplashScreen to be moved into the PC facade.
  • tweaks the various broad states of the engine (initialised/running/shutdown/disposed)

@GooeyHub
Copy link
Member

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/153/
Hooray Jenkins reported success with all tests good!

@Cervator
Copy link
Member

Poking potentially interested parties: @msteiger @MarcinSc @prestidigitator @flo @synopia

Edit: And @emanuele3d for good measure :-)

@flo
Copy link
Contributor

flo commented Jun 28, 2015

It's better then what we had be fore. So I am up for merging it.


/**
* Engine Status provides the current status of the engine - what it is doing, at a higher granularity than just running. This can be used by external and internal observers
* to report on the state of the engine, such as splash screens/loading screens.
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking here on github there seems to be some newline issue here. Not a problem when browsing the javadoc via browser I imagine but would be nice to fix for people dealing with the source.

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean the line length? It is within our coding standard's max line length. Unless we want to change that length.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now I understand. Disregard this comment then.

}

private void cleanup() {
logger.info("Shutting down Terasology...");
shuttingDown = true;
changeStatus(StandardGameStatus.SHUTTING_DOWN);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to me that this line is perhaps redundant with the identical line at the end of mainLoop().

* Simplified build in engine states. Engine no longer tracks and exposes initialization/shuttingdown/disposal states.
* Disposal bundled into shutdown. Engine no longer closable.
* run() is now synchronized to prevent multiple entry from different threads
*
@GooeyHub
Copy link
Member

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/160/
Hooray Jenkins reported success with all tests good!

@GooeyHub
Copy link
Member

GooeyHub commented Jul 3, 2015

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/161/

Build Log
last 5 lines

[...truncated 91 lines...]
    at hudson.model.Executor.run(Executor.java:240)
[ANALYSIS-COLLECTOR] Skipping publisher since build result is FAILURE
Notifying upstream projects of job completion
Setting status of 12edab53aa30ec79088403c8ec73576ddd026952 to FAILURE with url http://jenkins.terasology.org/job/TerasologyPRs/161/ and message: Merged build finished.

Uh oh, something went wrong with the build. Need to check on that

@immortius immortius force-pushed the engine-lifecycle-redux branch from 12edab5 to 58892c5 Compare July 3, 2015 03:41
@GooeyHub
Copy link
Member

GooeyHub commented Jul 3, 2015

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/162/

Build Log
last 5 lines

[...truncated 2427 lines...]
Build step 'Publish JUnit test result report' changed build result to UNSTABLE
[ANALYSIS-COLLECTOR] Computing warning deltas based on reference build #160
Notifying upstream projects of job completion
Setting status of 58892c5510b6e1bfddf956252a61a37291c4bcfd to FAILURE with url http://jenkins.terasology.org/job/TerasologyPRs/162/ and message: Merged build finished.

Uh oh, something went wrong with the build. Need to check on that

immortius added a commit that referenced this pull request Jul 3, 2015
Extract ThreadManager and introduce EngineStatus
@immortius immortius merged commit 8f2ab78 into MovingBlocks:develop Jul 3, 2015
@Cervator
Copy link
Member

Cervator commented Jul 3, 2015

I wish we could distinguish between unstable (test failures) and build failure in Jenkins on these PR tests (at least the log snippet gives a clue). The "failure" is from a single unit test seemingly breaking

http://jenkins.terasology.org/job/TerasologyPRs/162/testReport/junit/org.terasology.identity/CertificateTests/checkGeneratedSelfSignedCertificateValid/

Might fail in the main job too, still running. Probably an easy fix :-)

Thanks for all the work and review!

@Cervator Cervator added this to the !NEXT: v0.54.0 milestone Jul 3, 2015
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.

5 participants