Re: Someone changed my Thread Manager writeup?
- Posted by Al Getz <Xaxo at aol.com> Aug 11, 2005
- 549 views
Hi again, Mike: That's an interesting idea. "Strands" sounds somewhat descriptive, but it doesnt show the relationship to 'Threads' without further education on the part of the user, so maybe "Thread Strands" :) ? I'd just have to find a way to convey the meaning of what a "Strand" is/does without using too many words...i dont want to have to write a book to get users to understand what this does when they read the description. David Jarvis: QUOTE There are times when "simplicity" of algorithm provides speed which enables it to match (or even out perform) more complicated predictive algorithms in certain tasks (not necessarily all tasks). As far as the end user is concerned, it "looks" and "performs" like its more complicated "relative". In some cases it may even seem to the end user to be "better". END QUOTE Yes, i was trying to get that message across. It's not necessarily for all tasks, but when it is useable it's quite simple and pretty fast too. In a true 'parallel' thread setup the order of thread processing might go: 1-2-3-1-2-3-1-2-3 (three threads that each take three time slices) to get all three tasks done, while with this technique the processing would go more like: 1-2-3-3-3-2-2-1-1 The same amount of work is done, all three threads get processed, it's just the order isnt the same. Most important i think is that the gui doesnt hang no matter how many 'threads' are started, and to get this operation the programmer doesnt have to do too much work in coding it. Yes, there are limitations, but then it's a simple technique too. I think some of the other Eu users were just thinking critically in order to make sure the differences were well known ahead of time. I think that's a good idea too. I dont want anybody thinking they are getting real threads and then get disappointed after they download and spend an hour fooling around with it because it's not appropriate for their particular task. QUOTE I find Euphoria itself to have this "quality" - an elegant simplicity. END QUOTE Yes, i was trying to maintain that simplicity while still achieving certain goals i had for a few of my programs that i found needed to stop hanging the gui when they did long operations. I first found this technique to be useful a few years back when i was working on a chess program in C where the 'computer' would have to 'think' for long periods of time in a deep evaluation loop. I couldnt have the user sitting there waiting for the computer to come up with a move just to be able to take back their previous move, or worse yet, move the window around :) Because of this, i didnt need to actually compile with the multi threaded version. Interestingly, either way, you get approximately the same overall behaviour once the program is compiled. I may create a true 'threading' task manager that allows parallel 'threads' to run just to see how the two compare for a few applications. With this as well as with many other 'classes' used with my library, the user will then have the choice what technique they wish to use simply by including the appropriate include file... Either "ThreadManager01.ew" or "ThreadManager02.ew". What the heck, give users the choice right? Kat: QUOTE How about "Kinda Almost Threads" ? END QUOTE Hee hee, yeah, i was joking with one of my replies when i said i could stick in with the description of the file: "Threads in mirror may appear bigger than they actually are." :) Thanks again for all the ideas/suggestions. Take care, Al Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"