Skip to content

Rework LocalActivities waiting code to use nanoseconds #1277

New issue

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

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

Already on GitHub? # to your account

Merged

Conversation

Spikhalskiy
Copy link
Contributor

What was changed

Rework LocalActivities waiting code to use nanoseconds
Some other refactorings improving comprehension

Why?

System.currentTimeMillis shouldn't be used for timeouts and it's non monotonic

* FORCED_DECISION_TIME_COEFFICIENT);
long nextForcedDecisionTime = startTime + forcedDecisionTimeout;

long nextForcedDecisionTimeNanos = startTimeNanos + forcedDecisionTimeoutNanos;
Copy link
Member

Choose a reason for hiding this comment

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

Should say WFT instead of Decision

@Spikhalskiy Spikhalskiy force-pushed the rework-la-wait-code-to-nanos branch from 044bd36 to 2860378 Compare June 22, 2022 17:03
@Spikhalskiy Spikhalskiy force-pushed the rework-la-wait-code-to-nanos branch from 2860378 to 0f8f6c6 Compare June 22, 2022 18:08
@Spikhalskiy Spikhalskiy merged commit da51b48 into temporalio:master Jun 22, 2022
@Spikhalskiy Spikhalskiy deleted the rework-la-wait-code-to-nanos branch June 22, 2022 18:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants