简体   繁体   English

松动后如何保持线程运行 scope

[英]How to keep thread running after it loose scope

I am tring to make a DLL我正在尝试制作 DLL

My Exe Program calls the functions of DLL我的Exe程序调用DLL的功能

In a certain function, i create a thread.在某个 function 中,我创建了一个线程。 The thread will take 30-40 minutes to finish线程将需要 30-40 分钟才能完成

Meanwhile i have other things to do in Exe同时我在Exe还有其他事情要做

在此处输入图像描述

We cannot do anything with the exe program.我们不能对 exe 程序做任何事情。 Actually it is a game server, which has the option to load plugins(dlls) and squirrel embedded so that we can call functions of dlls from script of game server.实际上它是一个游戏服务器,它可以选择加载插件(dll)和嵌入的松鼠,以便我们可以从游戏服务器的脚本中调用 dll 的功能。

I used winapi's CreateThread function and i got what was wanted.我使用了 winapi 的 CreateThread function,我得到了想要的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM