An idea on multithreading implementation

Bob Sneidar bobs at twft.com
Wed Jan 19 11:48:09 EST 2011


I was thinking of something a lot more "native" than that. All threads in a multithreaded IDE or standalone could theoretically have access to all the objects and processes in all threaded processes. The engine would be responsible for internally keeping track of everything, and the developer would never need to be concerned about which thread. If Stack A running in one thread wanted to know the contents of a field or button on a card in stack B running in another thread, you would just code as normal. 

The advantage and goal would be to have entire stacks or just certain commands or functions running in their own thread so that a long process in one stack would not prevent another from running. 

But maybe it all works because it's only in my head. 

Bob


On Jan 18, 2011, at 6:17 PM, Jeffrey Massung wrote:

> Well, TCP works great, you just have to define your protocol and go. This wouldn't be too difficult to implement. That said, a native method of letting LC apps inter-communicate w/o having to program it [much] would be slick. Taking some ideas from AppleScript:
> 
> 
> ## app "A":
> 
> start script server on port 5674
> 
> 
> 
> ## app "B"
> 
> connect to application "A" on port 5674
> tell application "A" "doSomethingCool"
> 
> 
> 
> The real questions: 
> 
> * Security. Is there a [with password] parameter for the server app? SSL?
> * Is "doSomethingCool" a stack handler or is there an "on clientMessage" type handler?
> * Do you allow only loopback (localhost) connections or also remote connections?
> 
> 
> Simply put, this is really just a way of having RPC calls across LC applications. But, I admit, it'd be really cool. Certainly with the LC language it would be trivial to setup 2-way communication this way, having application "B" identifying itself to application "A", etc.
> 
> Jeff M.
> 
> 
> 
> On Jan 18, 2011, at 6:29 PM, Bob Sneidar wrote:
> 
>> Right... but they cannot communicate easily, or I should say natively with each other.
>> 
>> Bob
>> 
>> 
>> On Jan 18, 2011, at 5:26 PM, Phil Davis wrote:
>> 
>>> Hi Bob,
>>> 
>>> On 1/18/11 5:05 PM, Bob Sneidar wrote:
>>>> Maybe I am using the wrong term here. Often in Windows an application will open multiple instances of an application, and each instance will be it's own process. An explorer window for example is it's own instance of Windows Explorer, and runs on it's own regardless of what the other window is doing. If that is not multithreading, then I am talking about something else.
>>> 
>>> I'm not entirely sure what this is called either, but you can do it on a Mac too - just duplicate LiveCode. Then you can run 2 IDEs simultaneously.
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list