summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2021-04-16 14:50:44 +0800
committerGitHub <noreply@github.com>2021-04-16 08:50:44 +0200
commit12783dbcf0075492a3d090e4dc3ead3628c18a3a (patch)
treef4827716cd1838c8a2a5578373199840b9dbce59 /lib/system
parent95e8ddabb2bcc37e5f1bdd62bcc891b96f80083a (diff)
downloadNim-12783dbcf0075492a3d090e4dc3ead3628c18a3a.tar.gz
make the copy operation of Thread an error (#17734)
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/threads.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim
index def35c238..7fbfe54ab 100644
--- a/lib/system/threads.nim
+++ b/lib/system/threads.nim
@@ -90,6 +90,8 @@ type
       dataFn: proc (m: TArg) {.nimcall, gcsafe.}
       data: TArg
 
+proc `=copy`*[TArg](x: var Thread[TArg], y: Thread[TArg]) {.error.}
+
 var
   threadDestructionHandlers {.rtlThreadVar.}: seq[proc () {.closure, gcsafe, raises: [].}]