弱弱的问一下Qt Creator多线程怎么调试

弱弱的问一下Qt Creator多线程怎么调试,第1张

if gdb, on the command console:
set follow-fork-mode mode
Set the debugger response to a program call of fork or vfork A call to fork or vfork creates a new process The mode argument can be:
parent
The original process is debugged after a fork The child process runs unimpeded This is the default
child
The new process is debugged after a fork The parent process runs unimpeded
if QT creator:
Go to Tools > Options > Debugging > GDB Extended and select Debug all children

如果文件不大,应该以字节流的形式加载文件到内存,然后多线程同时读取,相当于批量上传前,单线程加载弄个进度条。
多线程读取文件的时候你可以给文件加锁,如果有锁sleep1没有锁就执行业务代码然后释放锁。
qt应用程序开发框架,一个1991年由QtCompany开发的跨平台C加加图形用户界面应用程序开发框架。它既可以开发GUI程序,也可用于开发非GUI程序,比如控制台工具和服务器。Qt是面向对象的框架,使用特殊的代码生成扩展以及一些宏,Qt很容易扩展,并且允许真正地组件编程。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zz/10228492.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-06
下一篇2023-05-06

发表评论

登录后才能评论

评论列表(0条)

    保存