See this is the perfect example of why some kind of multiple processing thing 
is needed. If you say

wait until <condition> then no other processing can take place. Even in the 
repeat loop it doesn't help. If the condition is triggered by some kind of 
execution the even will never happen because you are waiting. I know we 
hammered this to death in another thread, but this would be I think one of the 
main reasons why it would be beneficial. 

If the engine ran in a single thread by default, but you had the option of 
executing another command in another thread, you could do something like

do someKindOfLongProcess in new thread
do someOtherProcess in new thread
wait until someCondition

I am making this very simplistic, and maybe true multithreading is not the 
answer because of the inability of one process to access another processes 
memory/variables/whatever. But I wonder if LiveCode devs could make some kind 
of method for this that WOULD work? 

Don't want to spawn another lengthy thread on it. I am just thinking out loud. 
Out of curiosity though, I know nothing about multithreading, doesn't a thread 
that spawns another thread have access to anything the spawn does? 

Bob


On Jun 24, 2011, at 1:26 PM, John Craig wrote:

> Try something like;
> 
> Put the millisecs + 5000 into tTime
> Repeat until the millisecs > tTime or the uFlag of this card = true
> Wait for 100 millisecs with messages
> End repeat
> 
> Sent from my iPhone
> 
> On 24 Jun 2011, at 20:58, Pete <p...@mollysrevenge.com> wrote:
> 
>> Trying to figure out how to suspend processing until either a condition is
>> true OR a specific amount of time has elapsed.  Looks like the wait command
>> allows one or the other but not both.  Any ideas how to do this?
>> Pete
>> Molly's Revenge <http://www.mollysrevenge.com>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to