i got a small issue.
I am including a DLL compiled with Purebasic into LUA using FFI.
(Threadsafe is enabled in the compile settings)
Now there is the possibility of using CallBacks in giving a LUA Function to a Purebasic Procedure.
So far that works very nice. Except when i start a Thread in the Purebasic DLL it crashes.
I think i tried everything now but it just doesn´t work.
Example:
Code: Select all
Procedure TestThread(*function)
CallFunctionFast(*function)
EndProcedure
ProcedureDLL CallBackTest(*function)
CreateThread(@TestThread(), *function)
EndProcedure
Maybe it is really a problem with LUA?
I am also not sure how i should debug it correctly. I hope someone can help me here.
Thanks in advance.