- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 33.3k
 
gh-135557: Use atomic writes on heapq operations #135601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-135557: Use atomic writes on heapq operations #135601
Conversation
| 
           I think this could be "skip news"?  | 
    
          
 This is user-facing, so this does need a news. Something like "Fix race with lists and   | 
    
f7fbb68    to
    08770ec      
    Compare
  
            
          
                Misc/NEWS.d/next/Library/2025-06-17-23-13-56.gh-issue-135557.Bfcy4v.rst
              
                Outdated
          
            Show resolved
            Hide resolved
        
      0184b21    to
    463963d      
    Compare
  
    463963d    to
    c49ff7d      
    Compare
  
    …fcy4v.rst Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
c49ff7d    to
    27d6cb6      
    Compare
  
    2cc859d    to
    8cf4794      
    Compare
  
    8cf4794    to
    32d767f      
    Compare
  
    | 
           !buildbot nogil  | 
    
| 
           🤖 New build scheduled with the buildbot fleet by @ZeroIntensity for commit a10560e 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F135601%2Fmerge The command will test the builders whose names match following regular expression:  The builders matched are: 
  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well, assuming buildbots pass.
| 
           Thanks @xuantengh for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.  | 
    
…ading (pythonGH-135601) (cherry picked from commit 13cac83) Co-authored-by: Xuanteng Huang <44627253+xuantengh@users.noreply.github.com>
| 
           GH-135787 is a backport of this pull request to the 3.14 branch.  | 
    
| except IndexError: | ||
| pass | ||
| 
               | 
          ||
| self.run_concurrently(worker, (), n_threads * 2) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test is successful here because the worker function has no arguments.
But shouldn't the second argument args be a tuple?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it an empty tuple here?
          
 Oh yes it is.  | 
    
Use atomic writes on heapq operation.