-
Notifications
You must be signed in to change notification settings - Fork 36
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
Deprecate initialization delay #75
Deprecate initialization delay #75
Conversation
In the new code, we delay until initialization completes, and then add some ms to account for time required to start() all threads. Also, remove dependency on deprecated new Long() constructor. And add some comments to explain handling of ms time unit.
Is there any notion of initialization time out now? or will it just take as long as it takes? |
There is no enforcement of a timeout on initialization. After almost all of the shared data structures and Threads are allocated, we check the current time. We have not yet started the customer or server threads. We "assume" it will take 4 ms per thread to start them all up. (measurements showed it takes approximately 2 ms per thread on my cloud desktop). We set the simulation start time to the current time plus the anticipated time to startup all threads. If it takes longer than our assumed 4 ms per thread, we'll issue a warning message, but will not abort the simulation. |
@@ -183,11 +181,11 @@ void initialize(ExtrememThread t) { | |||
2 * Util.SizeOfFloat + 2 * Util.SizeOfBoolean); | |||
|
|||
// Account for 11 reference fields: args, dictionary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Account for 10 ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thanks. Fixed.
/integrate |
Automatically calculate the initialization delay rather than requiring users to guess and specify. The original InitializationDelay command-line argument is still supported for compatibility with existing scripts, but the value is ignored.
Additionally, fix up a few comments and remove dependencies on deprecated new Long() constructor.