Log in

View Full Version : Any tutorials for making thread safe plugins?


tedkunich
10th February 2009, 19:18
Anyone know of either tutorials/documentation of how to make plugins thread safe? I have been using Neuron's Multidecimate, but it is not thread safe - it does not return the indexes in order (pass 1 mode) and I wanted to see if I could tweak the code to make it behave properly.


Thanks,
Ted

Guest
10th February 2009, 20:21
it does not return the indexes in order (pass 1 mode) What do you mean by that?

tedkunich
10th February 2009, 20:44
What do you mean by that?

Don,

Using any of the setMTmodes (2-4), the mfile is not populated with contiguous frame numbers and corresponding matrix calculations. Not on my home machine right now so I cannot verify exactly, but using mode setMTmode(2) during pass 1 returns only even frame numbers, mode 3 only returns the odd's and mode 4 seems to drop them in no recognizable pattern.

FYI this happens on even a 500 frame sample - I have files that are 16G each that I need to process, so going the MT route can really save some time for me. :)


Ted

IanB
10th February 2009, 22:16
It is the expected (unfortunate) behaviour. Read up on how TSP implemented MT :search:

You have multiple instance of the filter, all opening the same stats file. The frames each instance processes is semi random.

tedkunich
11th February 2009, 02:07
It is the expected (unfortunate) behaviour. Read up on how TSP implemented MT :search:

You have multiple instance of the filter, all opening the same stats file. The frames each instance processes is semi random.

After thinking about it, I kinda thought it had more to do with the file I/O... darn....