[PR #85] [MERGED] Share memory by communicating 👍 #2613

Closed
opened 2026-03-15 20:53:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/85
Author: @hibiken
Created: 2/16/2020
Status: Merged
Merged: 2/17/2020
Merged by: @hibiken

Base: masterHead: fix/process-info


📝 Commits (4)

  • 6314e38 Make heartbeater goroutine a monitor goroutine for process info.
  • c1f2792 Use sync.WaitGroup for shutdown
  • f2333f8 Clean up heartbeater test
  • 67565eb Fix data race in subscriber test

📊 Changes

13 files changed (+145 additions, -110 deletions)

View changed files

📝 background.go (+24 -15)
📝 heartbeat.go (+25 -6)
📝 heartbeat_test.go (+27 -11)
📝 internal/base/base.go (+0 -22)
📝 internal/base/base_test.go (+0 -28)
📝 processor.go (+14 -10)
📝 processor_test.go (+26 -11)
📝 scheduler.go (+4 -1)
📝 scheduler_test.go (+3 -1)
📝 subscriber.go (+5 -1)
📝 subscriber_test.go (+8 -1)
📝 syncer.go (+4 -1)
📝 syncer_test.go (+5 -2)

📄 Description

Avoid the use of shared memory with mutex.
Changes made:

  • Confine ProcessInfo variable to the heartbeater goroutine
  • Use channels to request for updates in the variable.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynq/pull/85 **Author:** [@hibiken](https://github.com/hibiken) **Created:** 2/16/2020 **Status:** ✅ Merged **Merged:** 2/17/2020 **Merged by:** [@hibiken](https://github.com/hibiken) **Base:** `master` ← **Head:** `fix/process-info` --- ### 📝 Commits (4) - [`6314e38`](https://github.com/hibiken/asynq/commit/6314e384fb5e6aea147ca9be0864f953eb77cdd4) Make heartbeater goroutine a monitor goroutine for process info. - [`c1f2792`](https://github.com/hibiken/asynq/commit/c1f279292d4032b26598c39d9273655ee8d93a70) Use sync.WaitGroup for shutdown - [`f2333f8`](https://github.com/hibiken/asynq/commit/f2333f8f2cc8a57b4906c15f3bd6970f84899045) Clean up heartbeater test - [`67565eb`](https://github.com/hibiken/asynq/commit/67565eb5467f776d01e0a610f46a84ee01eb3ba7) Fix data race in subscriber test ### 📊 Changes **13 files changed** (+145 additions, -110 deletions) <details> <summary>View changed files</summary> 📝 `background.go` (+24 -15) 📝 `heartbeat.go` (+25 -6) 📝 `heartbeat_test.go` (+27 -11) 📝 `internal/base/base.go` (+0 -22) 📝 `internal/base/base_test.go` (+0 -28) 📝 `processor.go` (+14 -10) 📝 `processor_test.go` (+26 -11) 📝 `scheduler.go` (+4 -1) 📝 `scheduler_test.go` (+3 -1) 📝 `subscriber.go` (+5 -1) 📝 `subscriber_test.go` (+8 -1) 📝 `syncer.go` (+4 -1) 📝 `syncer_test.go` (+5 -2) </details> ### 📄 Description Avoid the use of shared memory with mutex. Changes made: - Confine `ProcessInfo` variable to the heartbeater goroutine - Use channels to request for updates in the variable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 20:53:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2613
No description provided.