sluggishness of 8.1.1 on send in 0/wait 0 pairs?

Dr. Hawkins dochawk at gmail.com
Tue Oct 25 14:18:53 EDT 2016


On Tue, Oct 25, 2016 at 10:18 AM, Richard Gaskin <ambassador at fourthworld.com
> wrote:

> Dr. Hawkins wrote:
>
> > I (like I assume many others) have a number of places with blocks like
> >
> > send doIt to stack worker in 0
> > wait 0 with messages
> > doSomethingElse
> >
> > I'm seeing a situation in which the code hits "DoSomethingElse"
> > before the "doIt" happens.
>
> If you want to ensure "doIt" happens before the calling handler continues,
> why not just remove the "in 0" clause?
>
>
Life is better if it actually happens--but can go on and get cleaned up
later if it doesn't.

"doIt" actually triggers a sync to the remote server in this case,
replacing a temporary, locally issued id with a permanent remote id.

However, on a mac, database queries take (at least) a minute to timeout, so
if there are lags, loss of connectivity, etc., it is better to move on.
Even if the local connection is laggy, better to move on than have the user
cursing at the screen because it's frozen . . .

But the problem is deeper than my synchronization.  The fact that it is
possible for doIt to not start means that it is not getting to the queue
before LiveCode moves on from the wait 0 with messages--that order should
be deterministic; there should be no possibility of the sequence that I'm
seeing happening . .

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462



More information about the use-livecode mailing list