2 Attachment(s)
LUA+: Crash with Thread use.
Hi,
I'm trying to create a small application which uses the "WHILE" or "FOR" in a new thread to let MMF2 runs and refreshes the frame... but I got a crash. :(
If I'm doing something wrong, maybe somebody can help me?
If you can have a look at it Jamie, that could be nice. Thanks. :)
Re: LUA+: Crash with Thread use.
Sorry but.. nobody has any idea?
Re: LUA+: Crash with Thread use.
I don't think MMF2 allows multi-threading or whatever
Re: LUA+: Crash with Thread use.
The extension LUA+ can do that... but it crashes in my example. That's the problem i'm trying to resolve...
Re: LUA+: Crash with Thread use.
I've never got the multi-threading to work in Lua+, you might ask Jam for help on this one :)
Re: LUA+: Crash with Thread use.
I'll take a look later tonight.
Re: LUA+: Crash with Thread use.
Great! :)
Thanks a lot :)
Re: LUA+: Crash with Thread use.
Any news about it ? :crazy:
:)
Re: LUA+: Crash with Thread use.
I would be tempted to just say avoid using threading in Lua+. It is not the most stable feature, and there are problems with calling MMF functions from Lua (MMF could be doing anything when you call it from another thread, like redrawing the frame). The only thing I could do would be to hold the execution of the script until MMF's event loop so the function can be called, but that would mean there would be no point in using threads in the first place. You can only communicate with a thread via variables.
Re: LUA+: Crash with Thread use.
Lua is a programming code like Basic, C#, C++, J# or jamagic, of course it's going to crash if you don't know how to use it properly and it takes many years to learn how to use it properly.