Araq / malebolgia

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

`Warning: =destroy (dest.value) can raise an unlisted exception: Exception [Effect]` displayed when running README's example #29

Closed fukusuket closed 7 months ago

fukusuket commented 7 months ago

Hello, I would like to thank you for maintaining the project.

Describe the issue I would like to report this because a WARNING was output when I executed the README below. https://github.com/Araq/malebolgia?tab=readme-ov-file#mutable-parameters-and-data-sharing

Step to Reproduce

  1. nimble init
  2. Copy https://github.com/Araq/malebolgia?tab=readme-ov-file#mutable-parameters-and-data-sharing example code
  3. nimble build

Expected behaviour WARNING is not output.

Actual behaviour WARNING is output as follows.

% nimble build 
  Verifying dependencies for Sample@0.1.0
     Info:  Dependency on malebolgia@any version already satisfied
  Verifying dependencies for malebolgia@0.1.0
   Building Sample/Sample using c backend
/Users/admin/Scripts/Nim/Sample/src/Sample.nim(15, 4) template/generic instantiation of `awaitAll` from here
/Users/admin/.nimble/pkgs2/malebolgia-0.1.0-5c404addea46d485f94915a897fba9906feff92d/malebolgia.nim(244, 5) template/generic instantiation of `checkBody` from here
/Users/admin/Scripts/Nim/Sample/src/Sample.nim(16, 6) template/generic instantiation of `spawn` from here
/Users/admin/.nimble/pkgs2/malebolgia-0.1.0-5c404addea46d485f94915a897fba9906feff92d/malebolgia.nim(177, 47) template/generic instantiation of `toTask` from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/tasks.nim(132, 20) template/generic instantiation of `isolate` from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/isolation.nim(37, 14) template/generic instantiation of `=destroy` from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/isolation.nim(27, 6) template/generic instantiation from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/isolation.nim(29, 13) Warning: `=destroy`(dest.value) can raise an unlisted exception: Exception [Effect]
/Users/admin/Scripts/Nim/Sample/src/Sample.nim(15, 4) template/generic instantiation of `awaitAll` from here
/Users/admin/.nimble/pkgs2/malebolgia-0.1.0-5c404addea46d485f94915a897fba9906feff92d/malebolgia.nim(244, 5) template/generic instantiation of `checkBody` from here
/Users/admin/Scripts/Nim/Sample/src/Sample.nim(16, 6) template/generic instantiation of `spawn` from here
/Users/admin/.nimble/pkgs2/malebolgia-0.1.0-5c404addea46d485f94915a897fba9906feff92d/malebolgia.nim(177, 47) template/generic instantiation of `toTask` from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/tasks.nim(132, 20) template/generic instantiation of `isolate` from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/isolation.nim(37, 14) template/generic instantiation of `=destroy` from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/isolation.nim(27, 6) template/generic instantiation from here
/Users/admin/.choosenim/toolchains/nim-2.0.2/lib/std/isolation.nim(29, 13) Warning: `=destroy`(dest.value) can raise an unlisted exception: Exception [Effect]

Environment

Additional context A similar issue has been reported with Nim. Is this an issue on Nim's side?

Sorry for my lack of understanding, but if this issue is scheduled to be resolved in Nim, I will close this issue.

fukusuket commented 7 months ago

In our project, we were using threadpool, so we are considering moving to malebolgia. https://nim-lang.org/docs/threadpool.html

Deprecated: use the nimble packages malebolgia, taskpools or weave instead

ringabout commented 7 months ago

It was fixed in the devel branch. You might use the devel compiler before the fix is backported to stable

Araq commented 7 months ago

It is a Nim issue not a Malebolgia issue. Thanks for using Malebolgia!

fukusuket commented 7 months ago

Thank you so much for your prompt reply! We look forward to the next release!🙂