任务管理器的工作方式 [英] How the task manager functions work

查看:80
本文介绍了任务管理器的工作方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是C#编程的新手......我正在尝试制作一个类似于让2个应用程序永不消亡的逻辑。如果退出应用程序(A)进程,则另一个应用程序(B)将再次启动该应用程序(A)进程,反之亦然。 (必须一直运行直到计算机关闭

I'm new to C# programming...I'm trying to make a logic something like making 2 applications never die. If application(A) process is exited then the other application(B) will start that application(A) process again and vice versa. (Must keep running until the computer is shut down)

目前,我找到了一个查找app(A).exe进程的方法,如果不存在则进程启动并且反之亦然。但是这会启动CPU ..

Currently, I made a way of finding app(A).exe process and if doesn't exists process starts and vice versa. But this fires up the CPU..

我使用了占用大量CPU的后台工作程序,以及不占用大量CPU的计时器。但是应该有一些东西比计时器更好

I've used the backgroundworker which takes up alot of CPU, and the timer which doesn't take up alot of CPU..But there should something better than timer

我想知道是否有类似使用事件处理程序的东西,但我无法达到它..

I'm wondering if there's something like using event handler but I just can't get to it..

有没有使用较少CPU并使用此逻辑的好方法?

Is there any good way to use less CPU and have this logic working?

推荐答案

占用大量CPU的背景工作者

这句话不正确。 BW他们自己对CPU的影响很小。 


这篇关于任务管理器的工作方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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