Araq / malebolgia

Malebolgia creates new spawns. Structured concurrency. Thread pools and related APIs.
MIT License
104 stars 10 forks source link

Error: type mismatch #15

Closed ingoogni closed 1 year ago

ingoogni commented 1 year ago

Using the first demo from the readme and compile with nim c -d:ThreadPoolSize=8 -d:FixedChanSize=16 dfs.nim results in:

.nimble\pkgs2\malebolgia-0.1.0-532e5b660dac9c98355f51d6704962fa326d77fb\malebolgia.nim(138, 15) Error: type mismatch
Expression: invoke(item.t, item.result)
  [1] item.t: Task
  [2] item.result: pointer

Expected one of (first mismatch at [position]):
[2] proc invoke(task: Task)

Win11, Nim1.9.3, Nimble install malebolgia and Nimble install malebolgia@#head

Araq commented 1 year ago

Nim1.9.3 does support this invoke call, yours is outdated.

ingoogni commented 1 year ago
> nim
Nim Compiler Version 1.9.3 [Windows: amd64]
Compiled at 2023-03-31
Copyright (c) 2006-2023 by Andreas Rumpf
>choosenim update 1.9.3
   Updating 1.9.3
      Info: Already up to date at version 1.9.3

There's something wrong then, somewhere

I also noted installing Malebolgia created a .nimble\pkgs2 dir

ingoogni commented 1 year ago
>choosenim update devel
   Updating devel
Downloading Nim latest-devel from GitHub
>nim
Nim Compiler Version 1.9.3 [Windows: amd64]
Compiled at 2023-06-14
Copyright (c) 2006-2023 by Andreas Rumpf

Ok, that did it. It works. Danke.