home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Fanart Handler
Latest Media Handler v2.4.X.000
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="arion_p" data-source="post: 1163228" data-attributes="member: 45945"><p>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.</p><p></p><p>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.</p><p></p><p>Do all your data manipulation in the background then switch to the main thread to talk to GUILib</p><p></p><p>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).</p></blockquote><p></p>
[QUOTE="arion_p, post: 1163228, member: 45945"] 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). [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Fanart Handler
Latest Media Handler v2.4.X.000
Contact us
RSS
Top
Bottom