Svelto.Tasks icon indicating copy to clipboard operation
Svelto.Tasks copied to clipboard

What is possible or not in Svelto.Tasks ?

Open TheBricktop opened this issue 3 years ago • 3 comments

Im just diving in to the convoluted world of tasks and threads and im really frustrated of all the limitations and (probably necessary) safety precautions of paralell processing. I have but one simple problem : i want to push webcamtexture processing to the background thread and recover vector3 array back to the main thread to use it for something fancy. The thing is that i have no idea if in Svelto.Tasks i have to convert the wecamtex to Color32 array or byte array and then convert it back to process it with external library for cv. Also i have no idea if this will speed the performace up or not.

TheBricktop avatar Jan 11 '21 17:01 TheBricktop

Hello,

theoretically is possible. Svelto.Tasks 1.5.9 is also theoretically stable, but it's a LONG time I don't use it as I know work with an alpha version of Svelto.Tasks 2.0 that is not releasable.

If I were you, I would check first the .net Tasks library. In many sense, they are really similar in the way of thinking, but at least you are 100% sure that .net Tasks works and nowadays is also as simple to use.

However, the problem of the .net tasks is that you need to instruct it about what a main thread is, otherwise it won't work. I guess you are talking about unity, so you need to look around for people who use the .net tasks library in unity.

If you want to check Svelto.Tasks, I am afraid that your only reference is the Svelto.Tasks.Tests repository, which has similar examples to what you are looking for.

sebas77 avatar Jan 11 '21 19:01 sebas77

@sebas77
Yes im using unity currently. Ive already thought about using tasks but im afraid that i couldnt use the unity specific objects like "webcamtexture" . My other choices currently are Unitask and bare net tasks.

TheBricktop avatar Jan 12 '21 14:01 TheBricktop

check this repo, you should find good examples: https://github.com/sebas77/Svelto.Tasks.Tests

I hope it will help you! Good luck.

sebas77 avatar Jan 12 '21 14:01 sebas77