put std/threads under the umbrella of nimPreviewSlimSystem (#20711)
* put `std/threads` under the umbrella of `nimPreviewSlimSystem` * add changelog * fixes tests * fixes tests again * fixes tests
This commit is contained in:
parent
fb2ec8d192
commit
e1ddd2d524
13 changed files with 33 additions and 19 deletions
|
|
@ -8,6 +8,9 @@ discard """
|
|||
|
||||
import std/atomics
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[assertions, threads]
|
||||
|
||||
const MemBlockSize = 256
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ discard """
|
|||
import std/envvars
|
||||
from std/sequtils import toSeq
|
||||
import stdtest/testutils
|
||||
import std/assertions
|
||||
import std/[assertions]
|
||||
|
||||
when not defined(js):
|
||||
import std/threads
|
||||
|
||||
# "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386)
|
||||
const unicodeUtf8 = "\xc3\x86"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ discard """
|
|||
"""
|
||||
|
||||
import os, net, nativesockets, asyncdispatch
|
||||
import std/[assertions]
|
||||
import std/[assertions, threads]
|
||||
|
||||
## Test for net.dial
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ discard """
|
|||
import std/os
|
||||
from std/sequtils import toSeq
|
||||
import stdtest/testutils
|
||||
import std/assertions
|
||||
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/[assertions]
|
||||
|
||||
# "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386)
|
||||
const unicodeUtf8 = "\xc3\x86"
|
||||
|
|
@ -55,6 +57,8 @@ when defined(windows):
|
|||
proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "<stdlib.h>".}
|
||||
|
||||
when not defined(js) and not defined(nimscript):
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/threads
|
||||
block: # bug #18533
|
||||
var thr: Thread[void]
|
||||
proc threadFunc {.thread.} = putEnv("foo", "fooVal2")
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ discard """
|
|||
disabled: "openbsd"
|
||||
"""
|
||||
# disabled: pending bug #15713
|
||||
import std/[net, nativesockets, assertions]
|
||||
import std/[net, nativesockets, assertions, threads]
|
||||
|
||||
when defined(posix): import os, posix
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ Crashes before getting here!
|
|||
"""
|
||||
|
||||
import std/os
|
||||
import std/threads
|
||||
|
||||
proc whatever() {.thread, nimcall.} =
|
||||
echo("TEST")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue