NightmareXIV / ECommons

A library for Dalamud
MIT License
34 stars 40 forks source link

Why not Task? #18

Closed ArchiDog1998 closed 1 year ago

ArchiDog1998 commented 1 year ago

https://github.com/NightmareXIV/ECommons/blob/c70f1231fa1649792c9243ef499fb0ec34485148/ECommons/ImGuiMethods/ThreadLoadImageHandler.cs#L69

I have a question about this line. Why there is a thread instead of a task? As far as I know, the task may be faster. I am not good at this.

Limiana commented 1 year ago

You could use task but task thread pool is shared between all plugins and if there's a lot of tasks next tasks could be delayed.. and I was told back then that thread is better for things that may take a while to run and this one definitely can take some time

ArchiDog1998 commented 1 year ago

Oh, I see. Thanks for your reply!