SendCommand + Multithreaded on/off

Got an idea, post it here

SendCommand + Multithreaded on/off

Postby S Pittaway on Wed May 23, 2007 8:32 am

Title says it all really.

You need to be able to specify wether multithreaded is on/off when you run a command via SendCommand in a plugin.

I keep running into problems because i cant turm it off inside my plugin.


Sean.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby P3rv3rt B3ar on Wed May 23, 2007 12:39 pm

What kind of problems exactly? is it because data gets corrupted within your plugin cause two or more threads end up entering there same time? If thats the case u can always police the thread entry point so that only one thread will go further at time and others will queue there.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby S Pittaway on Wed May 23, 2007 3:06 pm

why is there an option to turn multithreaded on/off on the event page? :)

when MT is on the screen is not updated untill the event has run...

You should be able to run events via a plugin and have them behave the same as when you press a key or click a button, at the moment it can behave differantly...



an example, plugins like xremote which trigger/mimic skin commands never work accurately, because you can not specify multithreaded off - if your event is setup with MT off whenever it is "mimiced" by xremote it always runs with MT on (and so the results can be quite differant)


another example, selecting a category item (like in xJumpTo) this calls next item untill it gets the item its after, with MT off thios is reasonable quick, BUT if MT is on it takes forever and you can see the cat change items...


another example, i like to catch screen changes (via xlevent) and auto position milkdrop, but i dont want to see the sceen redraw before i have moved the window in question, with MT on i cant do this when its off i can.


another example, many user interface actions feel slugish whenever MT is on, turning it off looks nicer (eg an event which hides some controls, shows others and then starts the a player... with MT off you can "see" things happen before the player starts).



For whats its worth you can fake it using CWin32.LockWindowUpdate but really it should be an option on SendCommand.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England