Skip to content

Commit 2fe4fca

Browse files
committed
remove copy
1 parent 680306f commit 2fe4fca

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/trio/_threads.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import contextlib
44
import contextvars
5-
import copy
65
import inspect
76
import queue as stdlib_queue
87
import threading
@@ -433,7 +432,7 @@ def abort(raise_cancel: RaiseCancelT) -> trio.lowlevel.Abort:
433432
# fill so from_thread_check_cancelled can raise
434433
# 'raise_cancel' will immediately delete its reason object, so we make
435434
# a copy in each thread
436-
cancel_register[0] = copy.copy(raise_cancel)
435+
cancel_register[0] = raise_cancel
437436
if abandon_bool:
438437
# empty so report_back_in_trio_thread_fn cannot reschedule
439438
task_register[0] = None

0 commit comments

Comments
 (0)