Re: Threads in LC

2021-01-11 Thread Bob Sneidar via use-livecode
That would be awesome. I really need to do this for the File Storage library I want to include in my app. Right now I just save the PDFs on my local HDD, and each client has it’s own subset of the files it creates. But if I could pass the binary data for the PDF over a client server system of

Re: Threads in LC

2021-01-08 Thread Alex Tweedly via use-livecode
On 08/01/2021 01:51, Bob Sneidar via use-livecode wrote: I have thought about this a bit. If what you mean by multiprocessing is that a new process can be spawned while your app can go off and do other things and get notified later that something happened, then this is quite doable. If what

Re: Threads in LC

2021-01-08 Thread JeeJeeStudio via use-livecode
Not that I know of. When using LC it uses the GPIO library/api from the Master Library in which it was embedded. If I recall correct that uses access to the GPIO library which is on the Raspberry. For this i can't recall if i needed to install something via terminal, which i needed to do for

Re: Threads in LC

2021-01-08 Thread David Bovill via use-livecode
I would find it very helpful if we would share some code in this “thread” about threads? At the moment I have a need to break up a heavy indexing task on a LiveCode server into a series of smaller steps that execute asynchronously. The web server receives a webhook  notifying it that there is

Re: Threads in LC

2021-01-08 Thread Graham Samuel via use-livecode
On a purely personal note (does that make it OT?), I think I am beginning to accept, at a pretty advanced age, that just understanding LC coding is not really enough to get stuff done. Linux for example I have managed to avoid, and many other technologies… perhaps learning all this stuff is

Re: Threads in LC

2021-01-07 Thread Richard Gaskin via use-livecode
Peter Bogdanoff wrote: > On Jan 7, 2021, at 3:07 PM, Richard Gaskin wrote: > >> Maybe. >> >> Does your Pi_gpio_output function use file I/O calls to the virtual >> file system in /run, or call an LCB or external using a lower-level >> interface for GPIO? > > > Maybe. Maybe not. In spite of all

Re: Threads in LC

2021-01-07 Thread Bob Sneidar via use-livecode
A little more clearly, ...respond DIRECTLY BACK to the original instances of the apps as opposed to the SPAWNING agent. On Jan 7, 2021, at 5:51 PM, Bob Sneidar via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: The fix for this is of course to have the spawned query agents, let’s

Re: Threads in LC

2021-01-07 Thread Bob Sneidar via use-livecode
I have thought about this a bit. If what you mean by multiprocessing is that a new process can be spawned while your app can go off and do other things and get notified later that something happened, then this is quite doable. If what you mean is that you want to make the app spawning the

Re: Threads in LC

2021-01-07 Thread Peter Bogdanoff via use-livecode
Maybe. Maybe not. In spite of all events, this may be the most challenging, nay, inscrutable question I have seen this year. Peter > On Jan 7, 2021, at 3:07 PM, Richard Gaskin via use-livecode > wrote: > > JeeJeeStudio wrote: > > > So what i actually meant is multiprocessing, would that

Re: Threads in LC

2021-01-07 Thread Richard Gaskin via use-livecode
JeeJeeStudio wrote: > So what i actually meant is multiprocessing, would that give > advantage? Maybe. Does your Pi_gpio_output function use file I/O calls to the virtual file system in /run, or call an LCB or external using a lower-level interface for GPIO? -- Richard Gaskin Fourth

Re: Threads in LC

2021-01-07 Thread JeeJeeStudio via use-livecode
For what i've seen and read is that one can run functions in their own thread, so you assign a thread to it. I'm not very experienced in Python, but that is what i read and i found it interesting. (slowly progressing the motor project with simplepygui and the GPIO)

Re: Threads in LC

2021-01-05 Thread doc hawk via use-livecode
richard reminisced, >I wonder if we can tailor an LC approach to more closely resemble it, or at >very least arrive >at a language feature proposal to give us parallelism within a single-thread >like Python does. I put some thought into this a few years ago. It could begin with some

Re: Threads in LC

2021-01-05 Thread Richard Gaskin via use-livecode
JeeJeeStudio wrote: > i will experiment some more and else continue with the Puthon version. Both Python and LiveCode are single-threaded. IIRC, Python offers parallelism as a programming style, but unless you're using one of the special builds I don't believe it offers true concurrency

Re: Threads in LC

2021-01-03 Thread JeeJeeStudio via use-livecode
Hi Rick, i will experiment some more and else continue with the Puthon version. Thanks for the comparison. It seems other brands are offering more for buck, except maybe community support may be less. Don't know exactly. Regards, Jerry Op 2-1-2021 om 23:00 schreef Rick Harrison via

Re: Threads in LC

2021-01-02 Thread Rick Harrison via use-livecode
Hi Jerry, 1 millisecond is probably asking too much of LC. It doesn’t give an LC processor enough time to do much of anything else and I can see why just moving the mouse would affect the speed of the motor. I’m assuming that what you really want is a steady rate for the motor rather than a

Re: Threads in LC

2021-01-01 Thread JeeJeeStudio via use-livecode
Thanks Bob, will try some out. regards, Jerry Op 31-12-2020 om 18:22 schreef Bob Sneidar via use-livecode: You can also try using callbacks, although the callback will not get processed until the next idle message (script execution termination or wait with messages). Bob S On Dec 31,

Re: Threads in LC

2021-01-01 Thread JeeJeeStudio via use-livecode
wrote: Hi, is it possible to assign threads in LC and why not? In python you can assign threads, not that i needed that with python, but it is possible. I'm playing with a stepper motor (for a while now) on a raspberry and with python it runs so smooth, with lc it's a different story. It runs, but w

Re: Threads in LC

2020-12-31 Thread Bob Sneidar via use-livecode
You can also try using callbacks, although the callback will not get processed until the next idle message (script execution termination or wait with messages). Bob S On Dec 31, 2020, at 8:53 AM, Rick Harrison via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Hi Jerry, What

Re: Threads in LC

2020-12-31 Thread Rick Harrison via use-livecode
ode > wrote: > > Hi, > > > is it possible to assign threads in LC and why not? > > In python you can assign threads, not that i needed that with python, but it > is possible. > > I'm playing with a stepper motor (for a while now) on a raspberry and with >

Threads in LC

2020-12-31 Thread JeeJeeStudio via use-livecode
Hi, is it possible to assign threads in LC and why not? In python you can assign threads, not that i needed that with python, but it is possible. I'm playing with a stepper motor (for a while now) on a raspberry and with python it runs so smooth, with lc it's a different story. It runs