16,012,107 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Beachhouse13 (Top 2 by date)
Beachhouse13
18-Jul-17 13:15pm
View
I don't know which is the best item to work on, but I can go ahead and work on the best 3, 4, or however many the CPU can handle at once. It may lead to a situation where an item is evaluated when it wouldn't have if I had gone sequentially, but that would be rare and the speedup from running in parallel would be more beneficial.
Beachhouse13
14-Jul-17 22:48pm
View
Richard, Thank you for your reply, but that will not work for me. I have to apologize as my original post was not that clear on my intent. I have added more description to help with that. Essentially, I do not want to work on every item in the list, which is why the sorting is important. With that I cannot use the ConcrurrentQueue will not work as I cannot insert items into it. I realize that the List class is slow and that is next on my list to make more efficient, but for now that is the best I can do. I plan on being able to use the list as I only access it on the main thread and not in any of the worker threads.
Also, thank you for pointing out the error in the code. That has been fixed.