nim-lang / threading

New atomics, thread primitives, atomic refcounting for --gc:arc/orc.
MIT License
73 stars 12 forks source link

can't send POD types without `=destroy` warning? #62

Open JorySchossau opened 6 months ago

JorySchossau commented 6 months ago

The compiler currently implicitly suggests I should box all my sends of POD types with objects so I can create null destructors (discard), which feels unnecessary. Isn't it isolated by definition?

var input = newChan[int]()
input.send(1) # isolation.nim(29, 13) Warning: `=destroy`(dest.value) can raise an unlisted exception: Exception [Effect]
planetis-m commented 2 months ago

The compiler currently implicitly suggests I should box all my sends of POD types with objects so I can create null destructors (discard)

I don't think that's what it is. but also I can't reproduce from your code sample.