parallelize and @parameter issue in Mojo 24.5
I am trying to convert my projects to Mojo 24.5. Right now I face the following issue.
When running
I get 4507533440 printed as result.
In the @parameter doc https://docs.modular.com/mojo/manual/decorators/parameter it says
This is an unsafe feature because we currently do not model the lifetimes of capture-by-reference.
but up to 24.4 i never had this issue. Did i miss some fundamental change here? Any advice how to handle this would be great. Thx
ps
adding
at the end of this demo would solve the issue but that gets complicated and ugly in my projects ...
When running
I get 4507533440 printed as result.
In the @parameter doc https://docs.modular.com/mojo/manual/decorators/parameter it says
This is an unsafe feature because we currently do not model the lifetimes of capture-by-reference.
but up to 24.4 i never had this issue. Did i miss some fundamental change here? Any advice how to handle this would be great. Thx
ps
adding
at the end of this demo would solve the issue but that gets complicated and ugly in my projects ...

