]> source.dussan.org Git - gitea.git/commit
Fix 64-bit atomic operations on 32-bit machines (#19531) (#19532)
authorGusted <williamzijl7@hotmail.com>
Wed, 27 Apr 2022 15:32:28 +0000 (15:32 +0000)
committerGitHub <noreply@github.com>
Wed, 27 Apr 2022 15:32:28 +0000 (10:32 -0500)
commit1465e0cbb2f9fc5927be51e9be39b4c9bfd6f464
tree9b54fd7fbf6040a7f9f033fa7b86a7db8c98dc4e
parent928b603d194d3447dc858733f5cb6213bf031ec6
Fix 64-bit atomic operations on 32-bit machines (#19531) (#19532)

- Backport #19531
  - Doing 64-bit atomic operations on 32-bit machines is a bit tricky by golang, as they can only be done under certain set of conditions(https://pkg.go.dev/sync/atomic#pkg-note-BUG).
  - This PR fixes such case whereby the conditions weren't met, it moves the int64 to the first field of the struct, which will 64-bit operations happening on this property on 32-bit machines.
  - Resolves #19518
modules/queue/workerpool.go