mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user