-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use mutexes for byte counts to fix i386/arm panic.
This commit changes the server byte counters over to use a mutex instead of the atomic package. The atomic.AddUint64 function requires the struct fields to be 64-bit aligned on 32-bit platforms. The byte counts are fields in the server struct and are not 64-bit aligned. While it would be possible to arrange the fields to be aligned through various means, it would make the code too fragile for my tastes. I prefer code that doesn't depend on platform specific alignment. Fixes #96.
- Loading branch information
Showing
2 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters