Skip to content

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Dec 18, 2025

Skipping news as the there is already a news entry in the original PR.

@kumaraditya303
Copy link
Contributor Author

No failure in 300+ iterations:

0:07:48 load avg: 3.39 [356] test_unittest.testmock.testthreadingmock passed (51.5 sec) -- running (3): test_unittest.testmock.testthreadingmock (51.8 sec), test_unittest.testmock.testthreadingmock (51.7 sec), test_unittest.testmock.testthreadingmock (51.9 sec)
0:07:48 load avg: 3.39 [357] test_unittest.testmock.testthreadingmock passed (51.7 sec) -- running (3): test_unittest.testmock.testthreadingmock (51.8 sec), test_unittest.testmock.testthreadingmock (51.7 sec), test_unittest.testmock.testthreadingmock (51.9 sec)
0:07:48 load avg: 3.39 [358] test_unittest.testmock.testthreadingmock passed (51.8 sec) -- running (1): test_unittest.testmock.testthreadingmock (51.9 sec)
0:07:48 load avg: 3.39 [359] test_unittest.testmock.testthreadingmock passed (51.7 sec)
0:07:48 load avg: 3.39 [360] test_unittest.testmock.testthreadingmock passed (51.9 sec)

@chaope
Copy link
Contributor

chaope commented Dec 19, 2025

Hi @kumaraditya303 ,

I have two questions:

  • why is NonCallableMock._lock reused here instead of a dedicated threading.Lock object for this part?
  • Could we change call_count to a property that calculates len(call_args_list) when call_count is called? In this way, we can avoid a lock to improve performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants