Delphi 匿名函数的几个实际应用(三)

来源:互联网 发布:淘宝怎么开手机维修店 编辑:程序博客网 时间:2024/05/27 10:42

Thread Synchronization with the VCL  VCL多线程同步

 

In multi-threaded applications that need to update the user interface, you
cannot access to properties of visual components (or in memory-objects)
that are part of the global thread without a synchronization mechanism.

 

The VCL, in fact, in not thread-safe (as is true for most user-interface libraries).
Two threads accessing an object at the same time could compromise its
state.

 

在一个多线程的需要更新用户界面的应用程序中,如果没有同步机制的话,你将不能访问是全局线程的一部分的可视组件的属性(或在内存的对象)。

 

原创粉丝点击