Skip to content

'=copy' is not available for type <Task>; requires a copy because it's not the last read of 'task'; routine: test #23

@lbcheng888

Description

@lbcheng888
import taskpools

var my {.threadvar.} : int
proc count(i:int) =
    my.inc

var tp = Taskpool.new()
for i in 0..100:
    tp.spawn count(i)
tp.syncAll()

--define:release
--hints:off
--warnings:off
--threads:on
--gc:orc

Nim Compiler Version 1.7.1 [Windows: amd64]
Compiled at 2022-09-15
Copyright (c) 2006-2022 by Andreas Rumpf

git hash: 79afee868d784eb90972deb3ea89c96702585968
active boot switches: -d:release

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions