Calling external support functions from other threads

Dar Scott dsc at swcp.com
Tue Jul 17 21:11:39 EDT 2012


The wisdom that I have inherited is that all support functions in the externals library must be called only from an external function or command called from LiveCode.  That is, they are not thread safe.  Others and I have repeated this.  

If an external has multiple threads then some thread-save method is needed to move data to where it can be picked up, or it is converted to an event that LiveCode handles.  

In particular SendCardMessage should not be called from a separate thread.

However, I have recently seen external source made public that does include SendCardMessage called from another thread.

So, I wonder.  Am I wrong?  

(I like the iOS external SDK.  It has nice methods for 'send' and 'wait'.  I can 'send' a message from any thread at any time.  Also, you can figure from the documentation, and maybe the header file, when you can do what when.)

Dar


---------------------------
Dar Scott
dba 
Dar Scott Consulting
8637 Horacio Place NE
Albuquerque, NM 87111

Lab, home, office phone: +1 505 299 9497
For Skype and fax, please contact.
dsc at swcp.com

Computer programming and tinkering,
usually in supporting those developing in 
LiveCode--typically by making LiveCode 
controls, libraries and externals, and
sometimes by writing associated
microcontroller firmware.  
---------------------------








More information about the use-livecode mailing list