diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 0e9b9ae5f..bb3ec9df0 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1720,6 +1720,8 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode = result = newStrNodeT(renderTree(n[1], {renderNoComments}), n) result.typ = getSysType(tyString) of mParallel: + if not experimentalMode(c): + localError(n.info, "use the {.experimental.} pragma to enable 'parallel'") result = setMs(n, s) var x = n.lastSon if x.kind == nkDo: x = x.sons[bodyPos] diff --git a/tests/parallel/nim.cfg b/tests/parallel/nim.cfg index b81c89721..d0d2a9305 100644 --- a/tests/parallel/nim.cfg +++ b/tests/parallel/nim.cfg @@ -1 +1,2 @@ threads:on +--experimental diff --git a/todo.txt b/todo.txt index ee1d6fa87..f9abed891 100644 --- a/todo.txt +++ b/todo.txt @@ -13,7 +13,6 @@ version 0.11.4 - make '--implicitStatic:on' the default; then we can also clean up the 'static[T]' mess in the compiler! -- Mark the 'parallel' statement as experimental. - add "all threads are blocked" detection to 'spawn' - Deprecate ``immediate`` for templates and macros - make 'nil' work for 'add': diff --git a/web/news.txt b/web/news.txt index 518793a4a..16ac286ae 100644 --- a/web/news.txt +++ b/web/news.txt @@ -44,6 +44,9 @@ News been removed. - ``macros.high`` never worked and the manual says ``high`` cannot be overloaded, so we removed it with no deprecation cycle. + - To use the ``parallel`` statement you now have to + use the ``--experimental`` mode. + Library additions