Skip to content

Commit

Permalink
Change struct alignment to work on both 32 and 64 bit OS
Browse files Browse the repository at this point in the history
  • Loading branch information
lekkas committed May 25, 2016
1 parent d9a325f commit 7a6bd15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion event.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ type APIActor struct {
}

type eventMonitoringState struct {
// `sync/atomic` expects the first word in an allocated struct to be 64-bit
// aligned on both ARM and x86-32. See https://goo.gl/zW7dgq for more details.
lastSeen int64
sync.RWMutex
sync.WaitGroup
enabled bool
lastSeen int64
C chan *APIEvents
errC chan error
listeners []chan<- *APIEvents
Expand Down

0 comments on commit 7a6bd15

Please sign in to comment.