Cancelling Parallel Loops(www.blackwasp.co.uk)

submitted by BlackWaspBlackWasp(4212) 4 months, 29 days ago

The Task Parallel Library includes static methods that provide parallel equivalents of the for and foreach loops. As with parallel tasks, these loops can be cancelled by other processes using a system of cancellation tokens.

2 comments |category: |Views: 61

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by dpetersondpeterson(4397) 4 months, 27 days ago 0

It's interesting that you can use the same cancellation tokens for tasks and loops. Personally I'd be a little worried about the spaghetti code that might encourage some people to write. I feel like separation of concerns would segregate all the functionality that needed to be cancelled by a particular token into one task.

Reply

posted by BlackWaspBlackWasp(4212) replied to dpetersondpeterson(4397), 4 months, 25 days ago 0

True.

Reply

information Login or create an account to comment on this story