Skip to content

Fix data race in host.BootTime#379

Merged
shirou merged 1 commit into
shirou:masterfrom
magiconair:fix-host-boottime-race
Jun 2, 2017
Merged

Fix data race in host.BootTime#379
shirou merged 1 commit into
shirou:masterfrom
magiconair:fix-host-boottime-race

Conversation

@magiconair
Copy link
Copy Markdown
Contributor

When host.BootTime is accessed concurrently there is a data race on cachedBootTime. Since host.BootTime is the only method accessing this variable I've moved it in front of the function using it to make it less likely to just use it by accident.

@shirou
Copy link
Copy Markdown
Owner

shirou commented Jun 2, 2017

Indeed. Thank you for your great contribution!

@shirou shirou merged commit e30b783 into shirou:master Jun 2, 2017
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.

2 participants