Skip to content

Commit e03a178

Browse files
authored
rename std/threads to std/typedthreads (#20850)
* rename `std/threads` to `std/oldthreads` * fixes tests * rename to `typedthreads` * changelog
1 parent 06cd156 commit e03a178

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- `std/formatfloat`
1616
- `std/objectdollar`
1717
- `std/widestrs`
18-
- `std/threads`
18+
- `std/typedthreads`
1919

2020
In the future, these definitions will be removed from the `system` module,
2121
and their respective modules will have to be imported to use them.

lib/pure/concurrency/threadpool.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ when not compileOption("threads"):
2323
import cpuinfo, cpuload, locks, os
2424

2525
when defined(nimPreviewSlimSystem):
26-
import std/[assertions, threads]
26+
import std/[assertions, typedthreads]
2727

2828
{.push stackTrace:off.}
2929

File renamed without changes.

lib/system.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,9 +2071,9 @@ when not defined(js):
20712071
when hostOS != "standalone":
20722072
include system/threadimpl
20732073
when not defined(nimPreviewSlimSystem):
2074-
{.deprecated: "threads is about to move out of system; use `-d:nimPreviewSlimSystem` and import `std/threads`".}
2075-
import std/threads
2076-
export threads
2074+
{.deprecated: "threads is about to move out of system; use `-d:nimPreviewSlimSystem` and import `std/typedthreads`".}
2075+
import std/typedthreads
2076+
export typedthreads
20772077

20782078
elif not defined(nogc) and not defined(nimscript):
20792079
when not defined(useNimRtl) and not defined(createNimRtl): initStackBottom()

nimsuggest/nimsuggest.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import compiler / [options, commands, modules, sem,
3030
pathutils]
3131

3232
when defined(nimPreviewSlimSystem):
33-
import std/threads
33+
import std/typedthreads
3434

3535
when defined(windows):
3636
import winlean

tests/arc/tweave.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ discard """
99
import std/atomics
1010

1111
when defined(nimPreviewSlimSystem):
12-
import std/[assertions, threads]
12+
import std/[assertions, typedthreads]
1313

1414
const MemBlockSize = 256
1515

tests/stdlib/tenvvars.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import stdtest/testutils
1010
import std/[assertions]
1111

1212
when not defined(js):
13-
import std/threads
13+
import std/typedthreads
1414

1515
# "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386)
1616
const unicodeUtf8 = "\xc3\x86"

tests/stdlib/tnetdial.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ discard """
55
"""
66

77
import os, net, nativesockets, asyncdispatch
8-
import std/[assertions, threads]
8+
import std/[assertions, typedthreads]
99

1010
## Test for net.dial
1111

tests/stdlib/tosenv.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "<stdlib.h>".}
5858

5959
when not defined(js) and not defined(nimscript):
6060
when defined(nimPreviewSlimSystem):
61-
import std/threads
61+
import std/typedthreads
6262
block: # bug #18533
6363
var thr: Thread[void]
6464
proc threadFunc {.thread.} = putEnv("foo", "fooVal2")

tests/stdlib/tssl.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ discard """
44
disabled: "openbsd"
55
"""
66
# disabled: pending bug #15713
7-
import std/[net, nativesockets, assertions, threads]
7+
import std/[net, nativesockets, assertions, typedthreads]
88

99
when defined(posix): import os, posix
1010
else:

tests/threads/t7172.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Crashes before getting here!
1010
"""
1111

1212
import std/os
13-
import std/threads
13+
import std/typedthreads
1414

1515
proc whatever() {.thread, nimcall.} =
1616
echo("TEST")

0 commit comments

Comments
 (0)