rename std/threads to std/typedthreads (#20850)
* rename `std/threads` to `std/oldthreads` * fixes tests * rename to `typedthreads` * changelog
This commit is contained in:
parent
06cd15663d
commit
e03a178bff
11 changed files with 12 additions and 12 deletions
|
|
@ -15,7 +15,7 @@
|
||||||
- `std/formatfloat`
|
- `std/formatfloat`
|
||||||
- `std/objectdollar`
|
- `std/objectdollar`
|
||||||
- `std/widestrs`
|
- `std/widestrs`
|
||||||
- `std/threads`
|
- `std/typedthreads`
|
||||||
|
|
||||||
In the future, these definitions will be removed from the `system` module,
|
In the future, these definitions will be removed from the `system` module,
|
||||||
and their respective modules will have to be imported to use them.
|
and their respective modules will have to be imported to use them.
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ when not compileOption("threads"):
|
||||||
import cpuinfo, cpuload, locks, os
|
import cpuinfo, cpuload, locks, os
|
||||||
|
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/[assertions, threads]
|
import std/[assertions, typedthreads]
|
||||||
|
|
||||||
{.push stackTrace:off.}
|
{.push stackTrace:off.}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2071,9 +2071,9 @@ when not defined(js):
|
||||||
when hostOS != "standalone":
|
when hostOS != "standalone":
|
||||||
include system/threadimpl
|
include system/threadimpl
|
||||||
when not defined(nimPreviewSlimSystem):
|
when not defined(nimPreviewSlimSystem):
|
||||||
{.deprecated: "threads is about to move out of system; use `-d:nimPreviewSlimSystem` and import `std/threads`".}
|
{.deprecated: "threads is about to move out of system; use `-d:nimPreviewSlimSystem` and import `std/typedthreads`".}
|
||||||
import std/threads
|
import std/typedthreads
|
||||||
export threads
|
export typedthreads
|
||||||
|
|
||||||
elif not defined(nogc) and not defined(nimscript):
|
elif not defined(nogc) and not defined(nimscript):
|
||||||
when not defined(useNimRtl) and not defined(createNimRtl): initStackBottom()
|
when not defined(useNimRtl) and not defined(createNimRtl): initStackBottom()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import compiler / [options, commands, modules, sem,
|
||||||
pathutils]
|
pathutils]
|
||||||
|
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/threads
|
import std/typedthreads
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
import winlean
|
import winlean
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ discard """
|
||||||
import std/atomics
|
import std/atomics
|
||||||
|
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/[assertions, threads]
|
import std/[assertions, typedthreads]
|
||||||
|
|
||||||
const MemBlockSize = 256
|
const MemBlockSize = 256
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import stdtest/testutils
|
||||||
import std/[assertions]
|
import std/[assertions]
|
||||||
|
|
||||||
when not defined(js):
|
when not defined(js):
|
||||||
import std/threads
|
import std/typedthreads
|
||||||
|
|
||||||
# "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386)
|
# "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386)
|
||||||
const unicodeUtf8 = "\xc3\x86"
|
const unicodeUtf8 = "\xc3\x86"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ discard """
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os, net, nativesockets, asyncdispatch
|
import os, net, nativesockets, asyncdispatch
|
||||||
import std/[assertions, threads]
|
import std/[assertions, typedthreads]
|
||||||
|
|
||||||
## Test for net.dial
|
## Test for net.dial
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "<stdlib.h>".}
|
||||||
|
|
||||||
when not defined(js) and not defined(nimscript):
|
when not defined(js) and not defined(nimscript):
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/threads
|
import std/typedthreads
|
||||||
block: # bug #18533
|
block: # bug #18533
|
||||||
var thr: Thread[void]
|
var thr: Thread[void]
|
||||||
proc threadFunc {.thread.} = putEnv("foo", "fooVal2")
|
proc threadFunc {.thread.} = putEnv("foo", "fooVal2")
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ discard """
|
||||||
disabled: "openbsd"
|
disabled: "openbsd"
|
||||||
"""
|
"""
|
||||||
# disabled: pending bug #15713
|
# disabled: pending bug #15713
|
||||||
import std/[net, nativesockets, assertions, threads]
|
import std/[net, nativesockets, assertions, typedthreads]
|
||||||
|
|
||||||
when defined(posix): import os, posix
|
when defined(posix): import os, posix
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Crashes before getting here!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import std/os
|
import std/os
|
||||||
import std/threads
|
import std/typedthreads
|
||||||
|
|
||||||
proc whatever() {.thread, nimcall.} =
|
proc whatever() {.thread, nimcall.} =
|
||||||
echo("TEST")
|
echo("TEST")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue