CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - System CAll Monitor
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - System CAll Monitor - List
[
Process-Thread
]
Watch
DL : 0
delphi环境下调用操作系统Api监视系统资源-delphi call the operating system environment monitor system resources Api
Date
: 2025-12-25
Size
: 760kb
User
:
侯永平
[
Process-Thread
]
Mutex_Critical
DL : 1
这个例子利用多线程使用不同的排序算法对数据进行排序,每一个线程使用不同的算法。主线程里使用快速排序QuickSort,其他四个算法分别建立四个子线程,在子线程中进行排序。因为每一个线程都要调用函数PrintResult把结果输出到显示器上,所以不同的线程就会争夺着向显示器输出,这样,不同线程的输出就会混合在一起,所以呢必须让线程一个接着一个输出。也就是必须对PrintResult进行互斥控 制。要进行互斥控制,则必须用到Event、Mutex、CrititicalSection、Semaphore等互斥控制量。这个例子可以使用 Event、Mutex、CrititicalSection,你可以根据提示修改代码使用其中的一种互斥量进行测试。 我所写的例子没有使用MFC,用的都是SDK的WINAPI,如果使用MFC时有些许差别,但原理是一样的。而且MFC还把线程分成用户界面线程和工作者线程,实质上用户界面线程跟工作者线程的差别是,用户界面线程要继承的基类已经实现了消息循环,MFC帮你做了很多的消息处理和界面控制的工作。 -The examples of using multiple threads to use a different sorting algorithm to sort the data, for each thread use a different algorithm. The main thread, use the quick sort QuickSort, the other four algorithms were the establishment of four sub-thread, thread in the sub-sort. Because each thread must call the function PrintResult the output to the monitor, so that different threads will compete for the output to the monitor, so that different threads of the output will be mixed together, so it must thread one by one output. That is, must be mutually exclusive control PrintResult System. Should be mutually exclusive control, you must use Event, Mutex, CrititicalSection, Semaphore and other exclusive control of the amount. This example can use the Event, Mutex, CrititicalSection, you can modify the code prompted a mutex using one volume of testing. I do not use examples written MFC, SDK are used in the WINAPI, if slightly different when using MFC, but the principle is the same. And MFC
Date
: 2025-12-25
Size
: 836kb
User
:
chenzifeng
[
Process-Thread
]
mohitjed-original
DL : 0
DLL的文件调用,可以在原有的基础上加以修改就可以监测系统的情况!,-Call DLL files, can be modified on the basis of the original can monitor system!
Date
: 2025-12-25
Size
: 8kb
User
:
hdpehtext
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.