I have a computationally intensive task that users can perform using a Silverlight application. This is a very simple task to parallelize.
My problem is that System.Environment.ProcessorCount is security critical, so I cannot verify this easily.
I do not want just QueueUserWorkItem, because I do not want to have more than the number of executable processors - this will not help.
One workaround is described below: http://www.codeproject.com/KB/silverlight/multicore.aspx
But this is a bit hacky, and it would work a bit to make it reliable enough for 4 or 8 threading systems.
What is the “right” way to solve this? Or is Silverlight just out of luck?
The fact that this method is SecurityCritical instead of SecuritySafeCritical is most likely an artifact of the fact that at some point the version of the desktop version of the .NET Framework required the EnvironmentPermission to receive this data.
We have since softened demand on the desktop side, so it actually makes sense to be SafeCritical for Silverlight. I raised this as a problem that we need to fix in a future version of Siverlight, and it looks like we can do it.
, , , SafeCritical Critical Silverlight, Microsoft Connect. , , .
, , - .
Silverlight 4.
, - . , . , , , , , 2 . , , , , .
, , - , , , 7zip. 2+ , , , . clunkier, , , , 4+ , .
Source: https://habr.com/ru/post/1705231/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1705226/can-you-configure-teamcity-artifacts-to-be-checked-back-into-source-control&usg=ALkJrhirmN9YPiApGlm4Rp7pbIIabk76aAHow to access Sharepoint SPNavigationNode.QuickLaunch? - sharepointHow to create test data for my Python script? - pythonHow to enable webHttp connection in WCF? - restcreating something like pageflakes - javascriptGeneral list in the interface - genericsRead eclipse installation path using eclipse API - javaJQuery help: drag to Sortable and then drag again - javascriptЛюбое приложение, которое перемещает приложение TServerSocket с D5 на D2007? - delphiLINQ to Objects - Philosophy of Use? - objectAll Articles