登录
首页 » Process-Thread » 我编了一个类似Windows 2000 上性能监视器的程序。在这个程序中,我创建了一个文档对象和几个视图。文档对象负责有规律地采集数据,然后通知相关的视图以不同...

我编了一个类似Windows 2000 上性能监视器的程序。在这个程序中,我创建了一个文档对象和几个视图。文档对象负责有规律地采集数据,然后通知相关的视图以不同...

于 2023-07-11 发布 文件大小:43.12 kB
0 69
下载积分: 2 下载次数: 1

代码说明:

我编了一个类似Windows 2000 上性能监视器的程序。在这个程序中,我创建了一个文档对象和几个视图。文档对象负责有规律地采集数据,然后通知相关的视图以不同的格式显示这些数据。文档对象为了有规律地采集数据,它需要一个定时(time)事件。但是,文档不是一个基于窗口的对象,所以它没有这样的定时事件。我权衡了三种解决方案: 1、在其中的一个视图中创建定时器。当事件发生时通知文档对象获取数据。 2、为每一个文档(或在每个文档内)创建一个单独的线程,以便这个线程能有规律地创建时间事件。 3、在CMainFrame中创建一个定时器并从中调用文档函数这三种方法我都不满意。能否给出一种更好的解决方案?

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 这个是一个关于多线程的程序线程其实是计算机运行的最小单位...
    这个是一个关于多线程的程序线程其实是计算机运行的最小单位-This is a multi-threaded on the procedures thread is the smallest computer operating units
    2023-03-18 07:25:03下载
    积分:1
  • 列出所有过程系统
    列举系统中所有进程-list all processes System
    2022-03-17 08:55:03下载
    积分:1
  • 在VC++ 6.0中实现程序单一运行
    在VC++ 6.0中实现程序单一运行-6.0 in VC procedures to achieve a single operation
    2022-05-09 13:55:40下载
    积分:1
  • 一个异步线程的例子!使用C++编写。 多线程编写初步例子!...
    一个异步线程的例子!使用C++编写。 多线程编写初步例子!-Example of an asynchronous thread! The use of C++ Prepared. Examples of the preparation of a preliminary multi-threaded!
    2022-02-04 20:02:34下载
    积分:1
  • VC 中进行进程线程控制 有兴趣的同志可以看看哪
    VC 中进行进程线程控制 有兴趣的同志可以看看哪-VC for process control threads are interested can find out where comrades!
    2022-02-12 05:25:47下载
    积分:1
  • 线程的同步   虽然多线程能给我们带来好处,但是也有不少问题需要解决。例如,对于像磁盘驱动器这样独占性系统资源,由于线程可以执行进程的任何代码段,且线程的运...
    线程的同步   虽然多线程能给我们带来好处,但是也有不少问题需要解决。例如,对于像磁盘驱动器这样独占性系统资源,由于线程可以执行进程的任何代码段,且线程的运行是由系统调度自动完成的,具有一定的不确定性,因此就有可能出现两个线程同时对磁盘驱动器进行操作,从而出现操作错误;又例如,对于银行系统的计算机来说,可能使用一个线程来更新其用户数据库,而用另外一个线程来读取数据库以响应储户的需要,极有可能读数据库的线程读取的是未完全更新的数据库,因为可能在读的时候只有一部分数据被更新过。-thread synchronization Although multithreading can bring us benefits, but there a lso many problems to be solved. For example, as disk drives such exclusivity system resources and can thread the process of implementation of any code, and the thread running by the scheduling system automatically and to a certain extent the uncertainty, So, then there could be two threads while the disk drives operate, which have operational errors; For example, For the computer banking system, may use a thread to update users of its database, and use another thread to read a database to respond to the needs of depositors, Reading is very likely to read threads database is not fully update the database, Reading may be because the time was only part of the updated dat
    2022-03-26 17:09:07下载
    积分:1
  • 极值问题.rar,7KB
    极值问题.rar,7KB-extreme problems. Rar, 7 kB
    2022-02-15 19:41:52下载
    积分:1
  • 线程的例子:读写文件,递归过程的创建…
    线程示例:读写文件、递归创建线程进程、快速排序-thread Example : reading and writing documents, recursive process of creating threads, Quick Sort
    2022-04-18 22:51:31下载
    积分:1
  • 设计是一个复杂的过程
    设计一个有 N个进程并发运行的进程调度程序,进程调度算法 :最高优先数优先的调度算法 。本实验模拟在单处理机环境下处理机的调度,了解处理机调度的过程。-design is a complicated process N-running process scheduler, process scheduling algorithm : the highest priority to a few priority scheduling algorithm. The experimental simulation of the single-processor environment processor scheduling, understanding processor scheduling process.
    2022-02-03 09:51:50下载
    积分:1
  • simple realization of a systematic process management. Can see the current syste...
    实现简单的系统进程管理。可察看当前系统中正在运行的进程,进程的基本信息。(如:进程大小、线程ID等)可终止某一进程。-simple realization of a systematic process management. Can see the current system running processes, the process of basic information. (Eg : Process size, thread ID, etc.) may terminate a process.
    2022-01-26 07:00:45下载
    积分:1
  • 696518资源总数
  • 106215会员总数
  • 5今日下载