1. Anyone else working on Threads for Euphoria?
- Posted by Al Getz <Xaxo at aol.com> Jan 25, 2005
- 544 views
Hello there, Anyone else working on Threads for Euphoria? Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
2. Re: Anyone else working on Threads for Euphoria?
- Posted by jacques deschênes <desja at globetrotter.net> Jan 25, 2005
- 539 views
A few month ago I started to wrap the win32api for threads then I read that for it to work, the application must be compile with multithread library and the the test program I'have done failed so I guess that exw.exe is not compiled compiled with multitrheads library. Jacques d.
3. Re: Anyone else working on Threads for Euphoria?
- Posted by Greg Haberek <ghaberek at gmail.com> Jan 25, 2005
- 661 views
I had it working, kinda. I could create multiple threads, but they did not run concurrently, and I had to explictly call ExitThread() or the code would crash. From what I've read though, ExitThread() is the "preferred method" of exiting a thread in C, not just letting the function end itself. So this may be correct behavior. If I had 2 threads, and each thread incremented a counter from 1 to 10 and output the result for each increment, I'd typically end up with this result, or something similar: Thread 1: 1 Thread 1: 2 Thread 2: 1 Thread 2: 2 Thread 2: 3 Thread 2: 4 Thread 2: 5 Thread 2: 6 Thread 2: 7 Thread 2: 8 Thread 2: 9 Thread 2: 10 Thread 1: 3 Thread 1: 4 Thread 1: 5 Thread 1: 6 Thread 1: 7 Thread 1: 8 Thread 1: 9 Thread 1: 10 As you can see, the threads do not run concurrently as expected. Maybe its because they run so fast, I don't know. I'm not too experienced with threads, and I don't do C programming. But as far as theory goes, it *did* work, in 100% Euphoria. I can provide code if anyone would like to see it, although it is pretty simple. In my opinion, I think one of our more experienced C programmer friends should write a DLL that handle threads and calls Eu functions from there, which would enhance the stability of threads in Euphoria. ~Greg On Mon, 24 Jan 2005 16:42:32 -0800, Al Getz <guest at rapideuphoria.com> wrote: > > posted by: Al Getz <Xaxo at aol.com> > > Hello there, > > Anyone else working on Threads for Euphoria? > > Take care, > Al > > And, good luck with your Euphoria programming! > > My bumper sticker: "I brake for LED's" > > > >
4. Re: Anyone else working on Threads for Euphoria?
- Posted by "Kat" <gertie at visionsix.com> Jan 25, 2005
- 536 views
On 24 Jan 2005, at 16:42, Al Getz wrote: > > > posted by: Al Getz <Xaxo at aol.com> > > Hello there, > > Anyone else working on Threads for Euphoria? <cough> windows server </cough> except it seems to use win98 calls that don't exist in 95, so i cannot use it. Kat
5. Re: Anyone else working on Threads for Euphoria?
- Posted by Al Getz <Xaxo at aol.com> Jan 25, 2005
- 529 views
Hello again, There were a number of responses so i grouped my replies all into one message post... Chris: Mic? Where can he be reached? Jacques: Oh ok, i guess you were going to use the Win32api C function calls then? Kat: Windows server? What's that? Greg: Sounds interesting. I'd like to hear a few more details about your implementation technique. It doesnt look that bad really and i think mine is somewhat like that too, as they end up nested... if n^th thread then if third thread then if second thread then if main thread then finish main end if finish second end if finish third end if finish n^th end if which still works out pretty well since new threads are created 'automatically'. Also, the same functions can be used as long as the code can be re-entered. Each thread gets to use it's own instance (via private vars). I'd like to hear some details about how yours works Greg. Im looking into other ways of doing it too. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
6. Re: Anyone else working on Threads for Euphoria?
- Posted by "Kat" <gertie at visionsix.com> Jan 25, 2005
- 520 views
On 25 Jan 2005, at 0:05, Al Getz wrote: > > > posted by: Al Getz <Xaxo at aol.com> > > Hello again, <snip> > Kat: > Windows server? What's that? Your code at http://www.rapideuphoria.com/displayserver206.zip !! You may have written it to serve multiple programs to one window, but the key phrase here is "multiple programs" , aka "multiple threads" since they can talk to each other thru the server. Kat
7. Re: Anyone else working on Threads for Euphoria?
- Posted by Al Getz <Xaxo at aol.com> Jan 25, 2005
- 514 views
- Last edited Jan 26, 2005
Kat wrote: > > On 25 Jan 2005, at 0:05, Al Getz wrote: > > > > > posted by: Al Getz <Xaxo at aol.com> > > > > Hello again, > > <snip> > > > Kat: > > Windows server? What's that? > > Your code at <a > href="http://www.rapideuphoria.com/displayserver206.zip">http://www.rapideuphoria.com/displayserver206.zip</a> > !! You may > have written it to serve multiple programs to one window, but the key phrase > here is "multiple programs" , aka "multiple threads" since they can talk to > each other thru the server. > > Kat > > Hi Kat, Ohh, the "Display Server". Yes, that's a good idea too. I also didnt realize it didnt work on Win95, but does that include the text writing too or just the picture displaying? There's probably a way to get it working in Win95 too if i know more about what the problem was. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
8. Re: Anyone else working on Threads for Euphoria?
- Posted by jacques deschênes <desja at globetrotter.net> Jan 25, 2005
- 516 views
- Last edited Jan 26, 2005
hello, Answer to Al: Yes I was using win32api calls, Anser to Greg: Yes I would like to see some working sample Jacques d.
9. Re: Anyone else working on Threads for Euphoria?
- Posted by "Kat" <gertie at visionsix.com> Jan 26, 2005
- 513 views
On 25 Jan 2005, at 12:04, Al Getz wrote: > > > posted by: Al Getz <Xaxo at aol.com> > > Kat wrote: > > > > On 25 Jan 2005, at 0:05, Al Getz wrote: > > > > > > > > posted by: Al Getz <Xaxo at aol.com> > > > > > > Hello again, > > > > <snip> > > > > > Kat: > > > Windows server? What's that? > > > > Your code at <a > > > > href="http://www.rapideuphoria.com/displayserver206.zip">http://www.rapideupho > > ria.com/displayserver206.zip</a> !! You may have written it to serve > > multiple > > programs to one window, but the key phrase here is "multiple programs" , aka > > "multiple threads" since they can talk to each other thru the server. > > > > Kat > > > > > Hi Kat, > > Ohh, the "Display Server". Yes, that's a good idea too. > I also didnt realize it didnt work on Win95, but does that > include the text writing too or just the picture displaying? > There's probably a way to get it working in Win95 too if > i know more about what the problem was. On 24 Jan 2005, at 11:25, Kat wrote: <snip> > (with Al's windows server, if i can fix it too. Al, see: > http://Tiggrbox.info/temp/windows.jpg !! ) , instead of the official RDS > version. The text did work at one time, i don't know what broke. I wanted to use it with Matts new interpreter. Kat
10. Re: Anyone else working on Threads for Euphoria?
- Posted by Al Getz <Xaxo at aol.com> Jan 26, 2005
- 502 views
Kat wrote: > >http://Tiggrbox.info/temp/windows.jpg > > Kat Hi Kat, If you display a picture before or after writing text (like a jpg) and that picture also has text written in it then the overall image might appear as if the text was typed over (strange) because the written text and the pic are logically or'd to the window. The only way around this is to clear the text or make sure the picture doesnt contain text or dont write to the server when there is going to be a pic with text in it displayed. The only way to change this default behaviour would be to overwrite text when a pic is displayed. Thing that would be good? Sometimes i like to display a pic in the background and write text over it. Perhaps another function added to the Display Server? Thanks, and take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"