Is there a .Net equivalent to java.util.concurrent.Executor?

后端 未结 5 2218
轻奢々
轻奢々 2021-02-20 01:35

Have a long running set of discrete tasks: parsing 10s of thousands of lines from a text file, hydrating into objects, manipulating, and persisting.

If I were implement

5条回答
  •  感情败类
    2021-02-20 02:06

    If you're going to ask a bunch of .NET people what's closest to being equivalent to Java Excecutors, it might not hurt to describe the distinguishing features of Java Executors. The person who knows your answer may not be any more familiar with Java than you are with .NET.

    That said, if the already-mentioned Task Parallel Library is overkill for your needs, or you don't want to wait for .NET 4.0, perhaps ThreadPool.QueueUserWorkItem() would be what you're looking for.

提交回复
热议问题