Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-96471: Add threading queue shutdown#104750

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes from1 commit
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
cd8ceaf
Add threading queue shutdown
EpicWinkSep 1, 2022
9c2971b
Fix queue shutdown
YvesDupFeb 10, 2023
089eb96
📜🤖 Added by blurb_it.
blurb-it[bot]May 6, 2023
ca118d7
Shut-down immediate consumes queue
EpicWinkMay 22, 2023
88f918d
Update test typing
EpicWinkDec 8, 2023
ab8d975
Remove queue-size tasks instead of setting to zero
EpicWinkFeb 5, 2024
f279f5c
Merge remote-tracking branch 'upstream/main' into threading-queue-shu…
EpicWinkFeb 8, 2024
971f699
Improve doc wording, reference methods
EpicWinkFeb 8, 2024
ddfb8c2
Reference method in news entry
EpicWinkFeb 8, 2024
3570bd8
Remove typing in test script
EpicWinkFeb 8, 2024
9072c6f
Fix join after task-done with no get
EpicWinkFeb 8, 2024
e0927aa
More explicitly update 'q.unfinished_tasks'
EpicWinkFeb 9, 2024
22adada
Add what's new entry
EpicWinkFeb 9, 2024
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
PrevPrevious commit
NextNext commit
Update test typing
  • Loading branch information
@EpicWink
EpicWink committedFeb 5, 2024
commit88f918d50f7eca1a8570604bf24cc5d7439bbbfe
20 changes: 18 additions & 2 deletionsLib/test/test_queue.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,16 @@
from test.support import import_helper
from test.support import threading_helper

import typing as t

if t.TYPE_CHECKING:
import queue

parent_class = unittest.TestCase

else:
parent_class = object

# queue module depends on threading primitives
threading_helper.requires_working_threading(module=True)

Expand DownExpand Up@@ -55,7 +65,10 @@ def run(self):
# is supposed to raise an exception, call do_exceptional_blocking_test()
# instead.

class BlockingTestMixin:
class BlockingTestMixin(parent_class):
if t.TYPE_CHECKING:
queue = queue
type2test: t.Type[queue.Queue]

def do_blocking_test(self, block_func, block_args, trigger_func, trigger_args):
thread = _TriggerThread(trigger_func, trigger_args)
Expand DownExpand Up@@ -797,7 +810,10 @@ class CFailingQueueTest(FailingQueueTest, unittest.TestCase):
queue = c_queue


class BaseSimpleQueueTest:
class BaseSimpleQueueTest(parent_class):
if t.TYPE_CHECKING:
queue = queue
type2test: t.Type[queue.Queue]

def setUp(self):
self.q = self.type2test()
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp