开发者

Can use managed thread to call native function

开发者 https://www.devze.com 2023-02-18 06:34 出处:网络
I have native function takes 2 arguments , i want to create managed thread to call this function, supposing the function is Func(arg1, arg2) ... how can i call it via creating a new managed thread ..

I have native function takes 2 arguments , i want to create managed thread to call this function, supposing the function is Func(arg1, arg2) ... how can i call it via creating a new managed thread .. i mean usi开发者_如何学Pythonng System::Threading.


A managed (System::Threading) thread has to have a managed thread procedure.

That managed procedure can call native functions all it wants, of course, but when you pass a ThreadStart or ParameterizedThreadStart delegate, that has to be managed code. Even if you manage to create a delegate pointing to native code, it's just because the compiler is creating a managed shim for you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号