我在类文件中有一个读写功能。这个类是类的子QThread类并覆盖了run,没有信号和槽,它基本上在一个线程中运行数据处理函数。在它的构造函数中是方法movetothread(this)。要让这两个函数组成一个队列并实现多线程,我可以movetothread(secondthread)在 write 函数中调用吗?
void write(args)
{
movetothread(secondthread);
}
使 write 函数在单独的线程上运行。写入功能如何以及何时停止?