Support thread-local variables declared inside procs; fixes #7565
This commit is contained in:
parent
b0d85b0adf
commit
ae5c946a32
4 changed files with 85 additions and 3 deletions
|
|
@ -7798,8 +7798,9 @@ Future directions:
|
|||
Threadvar pragma
|
||||
----------------
|
||||
|
||||
A global variable can be marked with the ``threadvar`` pragma; it is
|
||||
a `thread-local`:idx: variable then:
|
||||
A variable can be marked with the ``threadvar`` pragma, which makes it a
|
||||
`thread-local`:idx: variable; Additionally, this implies all the effects
|
||||
of the ``global`` pragma.
|
||||
|
||||
.. code-block:: nim
|
||||
var checkpoints* {.threadvar.}: seq[string]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue