有一个返回int的函数如何将它使用升压seprate线程上运行? [英] Having a function that returns int how to run it is seprate thread using boost?

查看:118
本文介绍了有一个返回int的函数如何将它使用升压seprate线程上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道它看上去并不neseserry但我希望它会帮助我找到内存泄漏。
因此,有一个返回int,如何把它从另一个类的函数调用类中的函数(称之为使函数reurns INT会在另一个线程中运行)?

I know it looks not neseserry but I hope that it would help me find memory leak. So having a function inside a class that returns int, how to call it from another function of that class (call it so that function that reurns int would run in another thread)?

推荐答案

操作系统在工作线程不会回收内存泄漏。这不是它是如何工作。

The operating system will not reclaim memory leaks in worker threads. That's not how it works.

修正你的错误。这个世界不需要任何更糟糕的软件。

Fix your bugs. The world doesn't need any more crappy software.

这篇关于有一个返回int的函数如何将它使用升压seprate线程上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆