Skip to content

Bunnymark example #148

Answered by yohamta
wizzymore asked this question in Q&A
Sep 1, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @wizzymore,
The update loop isn't blocked because of how Go's select statement works with time.Ticker. The select has a default case, making it non-blocking. It checks for a tick, but immediately moves on if there isn't one.

The ticker runs independently in the background. Between ticks, the update loop keeps running normally.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wizzymore
Comment options

Answer selected by wizzymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants