wooly Posted August 1, 2006 Share Posted August 1, 2006 Goodday , This is a question for Rick B. I am very interested in efficient use of threads with multiproc setups. Was reading the articles about Paint.NET and multireading/dual-core optimization by Rick. There is a statement in there that says "This, as well as the thread synchronization that goes with the progressive effect rendering, is easily the most complex code in Paint.NET.....". (which I didn't quite understand coz I thought the work it divided up into disjoint "regions"). Now, I was able to probe a little bit into this (I did Gaussian blur of a photo) and check what was happening (Mine is a 2P HT Xeon) (bring out the Gaussian blur dialog and use the slider to switch to a big "number" and watch the processors get busy) There are 4 threads doing PaintDotnet.Effects.BlurEffect and it seems I could not detect any contention of locks (actually no calling of even monitor enter/exit) during the blurring at all. Then there are 4 threads (poolthreads) that are occasionally active (They are drivn by async tasks enqueued by the main thread). (the main thread uses the Pdnlib's threadpooling APIs to control these 4 poolthreads). So summarizing my Qs: 1. The first set of 4 threads actually doing the blur ::: is there really no need to synchronize anything between them? or did I miss their synchronization action...) and more importantly, 2. what is the "complex" synchronization being mentioned by the article then? (it is not merely referring to the thread(pool) helper classes in pdnlib??) thanks in advance, wooly. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.