创建新线程,需要多少时间? [英] Create new thread, how much time is needed?

查看:657
本文介绍了创建新线程,需要多少时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个主循环,里面有一些循环.

I have a main loop, and there are some loops inside it.

我想对内部循环进行多线程处理. (一个完整的主循环周期需要50-200毫秒.主循环内部大约有3-4个循环)

I want to multithread the loops inside. (a complete cycle of main loop takes 50-200 milliseconds. the main loop has about 3-4 loops inside)

创建新的Thread需要多少时间?

How much time is needed to create a new Thread?

创建和销毁线程的最快方法是什么?

What is the fastest way to create and destroy threads?

推荐答案

请参阅这些扩展方法

System.Threading.Tasks.Parallel.For
System.Threading.Tasks.Parallel.ForEach
System.Threading.Tasks.Parallel.Invoke

这篇关于创建新线程,需要多少时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆