I have a computationally intensive task that users can perform using a Silverlight app. It is a very easy task to parallelize.
My problem is that the System.Environment.ProcessorCount is Security Critical, so I can't easily check that.
I don't want to just QueueUserWorkItem because I don't want to have more than the number of processors executing -- that won't help.
One workaround is described here: http://www.codeproject.com/KB/silverlight/multicore.aspx
But it's a bit hackish, and it'd be a bit of work to make it reasonably reliable for 4 or 8 thread systems.
What's the "right" way to solve this? Or does Silverlight just leave you out of luck here?