using send to "multi-task" ? [was: Non-blocking URL commands]

Robert Sneidar slylabs13 at me.com
Mon Nov 19 14:40:09 EST 2012


No that isn't how it works. That is what I thought as well. Send in time really means "do this after you have done everything else that is not send in time". The command will still be a blocking command. 

If you really want asynchronous database processing, save your query to a text file, then have a standalone monitor and read the text file read only, processing the query and deleting the text file when done. Have you app check for the existence of the text file first before creating it to avoid overwriting a previous query. Have your standalone create an error text file and check for that also before your app saves. 

It's a bit of a hack I know, but you'd be surprised how many back side integrations with online databases work this way. 

Bob


On Nov 18, 2012, at 7:17 AM, Dr. Hawkins wrote:

> On Fri, Nov 16, 2012 at 2:13 PM, Monte Goulding
> <monte at sweattechnologies.com> wrote:
>> It means other scripts can run but the script executing the post is blocked waiting for it
>> to return. It's how your users manage to execute other things while the http request is
>> going on. Disable anything you don't want them to do while waiting.
> 
> Wait a minute--does this mean we have a substitute for multi-threading
> or multi-tasking?
> 
> I have an issue when using a remote database.  When leaving a field,
> the db is updated, but the lag can be a second or two, preventing the
> user from moving to the next field.
> 
> So if instead of "doing it," I
> 
>     send doit to field somefield in 1 ms
> 
> the user could be happily typing away?
> 
> However, if I'm reading things right, "send" won't travel up the
> message path or be passed, while "dispatch" will--but dispatch doesn't
> have an "in time" available.
> 
> perhaps
> 
>   send startit to somefield in 1 ms
> 
> and a handler of
> 
>    on startit
>         dispatch finishit to the target
>    end startit
> 
> (closeField is often partly handled and then passed from field or
> group to card and even stack)
> 
> 
> 
> 
> -- 
> Richard E. Hawkins, Esq.
> (702) 508-8462
> 
> _______________________________________________
> 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