[PR #10070] [MERGED] fix(integration): move waitgroup Add(1) outside goroutine to avoid potential issue #13139

Closed
opened 2026-04-13 00:18:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10070
Author: @googs1025
Created: 4/1/2025
Status: Merged
Merged: 4/8/2025
Merged by: @mxyng

Base: mainHead: fix/integration_TestMaxQueue


📝 Commits (1)

  • 89073a1 fix(integration): move waitgroup Add(1) outside goroutine to avoid potential issue

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 integration/max_queue_test.go (+2 -2)

📄 Description

Detailed description:

  • Moved waitgroup.Add(1) out of the goroutine to ensure the WaitGroup counter is properly set before any goroutine starts.
  • Prevents potential issues where waitgroup.Wait() might return prematurely due to scheduling delays.
  • Aligns with best practices for using sync.WaitGroup.

🔄 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/ollama/ollama/pull/10070 **Author:** [@googs1025](https://github.com/googs1025) **Created:** 4/1/2025 **Status:** ✅ Merged **Merged:** 4/8/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `fix/integration_TestMaxQueue` --- ### 📝 Commits (1) - [`89073a1`](https://github.com/ollama/ollama/commit/89073a182f897363fe7545af6f00be8cead390c3) fix(integration): move waitgroup Add(1) outside goroutine to avoid potential issue ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `integration/max_queue_test.go` (+2 -2) </details> ### 📄 Description Detailed description: - Moved waitgroup.Add(1) out of the goroutine to ensure the WaitGroup counter is properly set before any goroutine starts. - Prevents potential issues where waitgroup.Wait() might return prematurely due to scheduling delays. - Aligns with best practices for using sync.WaitGroup. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:18:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13139