Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Include/internal/pycore_ceval_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct _pending_call {
int flags;
};

#define PENDINGCALLSARRAYSIZE 32
#define PENDINGCALLSARRAYSIZE 300

#define MAXPENDINGCALLS PENDINGCALLSARRAYSIZE
/* For interpreter-level pending calls, we want to avoid spending too
Expand All @@ -31,7 +31,9 @@ struct _pending_call {
# define MAXPENDINGCALLSLOOP MAXPENDINGCALLS
#endif

#define MAXPENDINGCALLS_MAIN PENDINGCALLSARRAYSIZE
/* We keep the number small to preserve as much compatibility
as possible with earlier versions. */
#define MAXPENDINGCALLS_MAIN 32
/* For the main thread, we want to make sure all pending calls are
run at once, for the sake of prompt signal handling. This is
unlikely to cause any problems since there should be very few
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_capi/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,9 +1570,9 @@ def test_max_pending(self):
self.assertEqual(added, maxpending)

with self.subTest('not main-only'):
# Per-interpreter pending calls has the same low limit
# Per-interpreter pending calls has a much higher limit
# on how many may be pending at a time.
maxpending = 32
maxpending = 300

l = []
added = self.pendingcalls_submit(l, 1, main=False)
Expand Down