Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Georgios Rovolis 7 posts 78 karma points
    Jul 18, 2019 @ 01:37
    Georgios Rovolis
    0

    Parallel ForEach / AsParallel

    Hi all,

    I am running an Umbraco site on the latest v7 version. I am trying to process a large number of examine results in a loop and create some view models out of it.

    I have tried both Parallel.ForEach and Parallel Linq (AsParallel()), but after the first iteration I get "object cannot be null exception". If I remove the parallel thing and use a traditional loop or normal linq it works fine.

    I have been using all sorts of Parallel stuff through the website when doing api calls and fetching responses with no problem, it this an Umbraco limitation or is there something else I could be doing?

    Thanks, George

Please Sign in or register to post replies

Write your reply to:

Draft