Вы посмотрели ЖЕНА ? Мы используем это в нашем приложении, которое переводит сообщения SWIFT во внутренний формат XML и назад снова. У нас не было проблем с ним. Кроме того, это лицензируется под LGPL, таким образом, можно изрубить его, если Вы должны. Проверьте его.
Task Parallel Library cares about the static type of the sequence. It should be IParallelEnumerable
for the operations to be handled by the TPL. You are casting the collection back to IEnumerable
when you call Test
. Therefore, the compiler will resolve .Where
call on the sequence to System.Linq.Enumerable.Where
extension method instead of the parallel version provided by the TPL.
As Parallel works by putting your stuff into the ThreadPool. Also, how many cores do you have? If you're working on a single core machine that will still take about 4s to run.