我目前正在为现有VCL应用程序开发新功能。该应用程序使用名为TeeChart的第三方包创建图表和静态图像。 有一个实例需要加载200万个数据点才能创建静态图像图表。但是,这需要一段时间才能加载,用户在应用程序 中无法执行任何操作,直到完成为止。因此,我宁愿创建一个工作线程来处理数据点,因此GUI不会冻结。如何为单个线程化GUI应用程序创建额外的工作线程?
setData()
设置以下成员变量,其中VCL组件将会进入并使用它来创建图表的方法:
// Holds the Y position for the image (columns)
DynamicArray<double>* mpda_XValues;
// Holds the colour for the corresponding element in the x and y
// position
DynamicArray<double>* mpda_YValues;
// Holds the z position for the image (rows)
DynamicArray<double>* mpda_ZValues;
什么东西创建工作线程时,我应该考虑什么?
如何在一种方法中发生所有数据处理时使用boost来创建线程setData(){...}
?