Threading or similar in LiveCode

Scott Rossi scott at tactilemedia.com
Fri Jul 20 06:08:53 EDT 2012


Hi Rod:

I'm don't use Python but if you're referring to threading as in
multithreading -- running multiple threads simultaneously -- LiveCode
doesn't have this.  One way you can *kind of* simulate threading is using
the send command:  send "xyz" to button 5 in 20 millisecs .  This doesn't
accomplish true multithreading, but in some cases allows near simultaneous
processing of multiple messages, if the code to be executed isn't too time
consuming or blocking.  Another method could be to run a completely separate
LiveCode process and allow the two to exchange data/messages.

Other folks may have additional suggestions.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, Rod McCall wrote:

> Dear LiveCoders,
> 
> As I said in a previous email I am returning to LiveCode after a few
> years (well seven to be exact) so am a little rusty. Anyway right now
> we are implementing a car simulator environment of which we will use
> LiveCode as the control console for the simulation - at least that is
> the current plan. Am I right in thinking there is no equivalent to the
> Threading class that you find in Python? If so how do people implement
> something which is similar to this? I may have missed the info in the
> docs but a quick Google or scan of the RR website for anything
> resembling threading seems to yield very little.
> 
> If no such equivalent exists are there ways round this? For example
> using sub-stacks etc each one behaving like a "fake thread"?
> 
> Sorry if this seems a silly question but it has been a few years since
> I used LiveCode.
> 
> Kind regards,
> 
> rod








More information about the use-livecode mailing list