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

consumer: jitter might have no effect #114

Merged
merged 1 commit into from
Feb 9, 2015
Merged

consumer: jitter might have no effect #114

merged 1 commit into from
Feb 9, 2015

Conversation

judwhite
Copy link
Contributor

@judwhite judwhite commented Feb 9, 2015

ticker starts when it's created. when it's created before waiting on jitter the jitter has no effect, unless jitter is greater than the tick interval.

example:

start := time.Now()

ticker := time.NewTicker(1500 * time.Millisecond)
time.Sleep(1000 * time.Millisecond)

<-ticker.C

fmt.Println(time.Now().Sub(start))

original PR was closed with rebase (oops) #113

@judwhite
Copy link
Contributor Author

judwhite commented Feb 9, 2015

for clarity, jitter is always less than LookupdPollInterval

mreiferson added a commit that referenced this pull request Feb 9, 2015
consumer: jitter might have no effect
@mreiferson mreiferson merged commit 160dc75 into nsqio:master Feb 9, 2015
@mreiferson mreiferson added the bug label Feb 9, 2015
@mreiferson
Copy link
Member

thanks!

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

Successfully merging this pull request may close these issues.

2 participants