Multithreaded Application Tutorial/zh CN
From Free Pascal wiki
Jump to navigationJump to search多线程应用的教程
(本页面目前不是 Multithreaded Application Tutorial的翻译,是我自己写的。User:Pengtu)
有个线程类 TThread,用来创建额外线程,并听命于默认主线程。
1.0自带4个例子,位于 \Lazarus\examples\multithreading\
for Windows
TThread是个虚类,要实例化,尤其是执行方法要实例化。
for Linux
需要引用一两个单元
uses
{$ifdef unix}
cthreads,
cmem, // the c memory manager is on some systems much faster for multi-threading
{$endif}
Interfaces, // this includes the LCL widgetset
Forms
TThread类的使用方法同Windows。