Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is possible or not in Svelto.Tasks ? #26

Open
TheBricktop opened this issue Jan 11, 2021 · 3 comments
Open

What is possible or not in Svelto.Tasks ? #26

TheBricktop opened this issue Jan 11, 2021 · 3 comments

Comments

@TheBricktop
Copy link

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.

@sebas77
Copy link
Owner

sebas77 commented Jan 11, 2021

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.

@TheBricktop
Copy link
Author

@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.

@sebas77
Copy link
Owner

sebas77 commented Jan 12, 2021

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

I hope it will help you! Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants