I would like to use std.paralellism.TaskPool to schedule various tasks I create. The problem however is that these tasks don't have a lifetime which is bound to any function scope I have. So I need to create a new task object on the heap and push it into a array for bookkeeping. The problem however is that std.paralellism.Task is a struct and the only way to instanciate it is to use std.paralelism.task which returns it as a value. I have no idea at the moment how to allocate a instance of std.paralellism.Task on the heap. Any suggestions?

Kind Regards
Benjamin Thaut

Reply via email to