- Moderator
- #451
Yes it will. You cannot update GUI controls in a background thread. If you do, you will get a "Collection changed during enumeration" exception (in the best case) or the "LoadSkin: Running on wrong thread" (worst case). If you are careful you can switch to the main thread only for certain operations that may cause issues and do the rest in the background. However this might not be safe - something that works now may break in the future because of an unexpected change in one of the methods called in the background thread.
Since in MP1 there is no discrete well defined API and hence no documentation about threading (= guaranteed thread-safety) there is no way to know but to assume pretty much nothing is thread safe.
Do all your data manipulation in the background then switch to the main thread to talk to GUILib
PS: MP also has a way to handle executing code on the main thread (events) but it is very cumbersome IMHO. It does however guarantee that the code will be run in a specific sequence in the message loop (before Process() IIRC).
Hi Arion
What about : https://forum.team-mediaportal.com/...-some-loadskin-error-from-plugin-side.132862/ ?
I know that Gibman has used it in WIP branch and it fix loadkskin error what i tested it but would like to have your expertise