Multi-threading a button action?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Multi-threading a button action?

Post by bn » Wed Apr 07, 2010 9:24 pm

Well, Mark,

either shawn posts his code or someone should point him into the direction of non-blocking code in Rev. (Or both).
Rev is not multi-threaded. But as Richard and implicitly all others pointed out you can construct almost all your script in ways that are non-blocking, which of course is not multi-threaded since the commands are interwoven.
The concept is in my opinion well illustrated in the Resource Center (Help Menu) in Applications. A blocking and a non-blocking version of 99 bottles. "Display a count down"
May be this helps to make the point.
regards
Bernd
Attachments
Bild 3.png
Bild 3.png (82.83 KiB) Viewed 4210 times

shawn
Posts: 18
Joined: Sat Jan 02, 2010 4:11 am

Re: Multi-threading a button action?

Post by shawn » Wed Apr 07, 2010 11:36 pm

"Exactly, Bernd, that's why I'm interested in seeing Shawn's script. Maybe he is doing more than just speaking."

It is, it is also highlighting the word as it is being read and keeping some statistics on the useage.

Shawn

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Multi-threading a button action?

Post by bn » Wed Apr 07, 2010 11:39 pm

shawn
shawn wrote:It is, it is also highlighting the word as it is being read and keeping some statistics on the useage.
this sounds like a good candidate for the non-blocking options in Rev.
Maybe you really might want to share your script.
regards
Bernd

shawn
Posts: 18
Joined: Sat Jan 02, 2010 4:11 am

Re: Multi-threading a button action?

Post by shawn » Wed Apr 07, 2010 11:44 pm

"Rev is not multi-threaded. But as Richard and implicitly all others pointed out you can construct almost all your script in ways that are non-blocking, which of course is not multi-threaded since the commands are interwoven."

Not being threaded is just shocking for any sort of current system, the 80s are long gone. I'm sure I could jump through a bunch of hoops to make this work the way I want but it would be cleaner/easier if I could just thread it.

Shawn

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4166
Joined: Sun Jan 07, 2007 9:12 pm

Re: Multi-threading a button action?

Post by bn » Wed Apr 07, 2010 11:55 pm

shawn wrote:ot being threaded is just shocking for any sort of current system, the 80s are long gone. I'm sure I could jump through a bunch of hoops to make this work the way I want but it would be cleaner/easier if I could just thread it
either you want to be shocked (=blocked) or get something done. I urge you to get out of the shocked state and have a look at what can be done. What you are doing is just a couple of milliseconds needed (marking text, doing statistics etc) and you could easily use the rest of the seconds to do other things.
Just curious, which 4th level language offers threading?, did you ever do threading in programming?
regards
Bernd

shawn
Posts: 18
Joined: Sat Jan 02, 2010 4:11 am

Re: Multi-threading a button action?

Post by shawn » Thu Apr 08, 2010 6:59 pm

"Just curious, which 4th level language offers threading?"

No idea, I don't care what others can or can not do. I care what Revolution can or can not do.

If no others do that is all the more reason why Revolution should, it would differentiate itself from others. If others can and Revolution can't that also differentiates Revolution from the others.

"did you ever do threading in programming?"

Yes.

Shawn

Post Reply