Re: Eu Threading -- Cheap Threads

new topic     » goto parent     » topic index » view thread      » older message » newer message

>From: Pete Lomax <petelomax at blueyonder.co.uk>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: Re: Eu Threading -- Cheap Threads
>Date: Mon, 20 Sep 2004 23:44:28 +0100
>
>On Mon, 20 Sep 2004 17:53:31 -0400, Elliott Sales de Andrade
><quantum_analyst at hotmail.com> wrote:
>
> >    It's not really the problem of finding a library to wrap, but the=
=20
>fact
> >that certain things in Eu just don't work with threads. There are certai=
n
> >register variables or memory structures that aren't quite thread-safe.
>
>I'd be quite interested in understanding more about that, and having a
>hack at making some (hopefully rather simple) example work.
>
>I have not come from a thread-aware/supporting language background,
>so some trivial examples you believe _should_ work would be best.
>

I'm no expert, so don't quote me on that. I'm just going by what Robert
said.
You can try this example: http://wingzone.tripod.com/basswma.zip You should=
=20
be
able to choose a sample rate, and press start. Then it will broadcast your
stereo mix over WMA, and after the window closes, print 543546 and wait for=

you to press a key. What I see is Euphoria exiting from the WinMain()
routine,
but the window hasn't closed, and printing 543546 and waiting for a key.=
=20
Then
it crashes because the encoding is trying to continue in the background.=
=20
Now,
the encoding (or maybe recording, one of em) is supposed to be running in a=

seperate thread in Bass. Perhaps it is just a mistake I made in the code=
=20
(but
that could /never/ happen, right??), and it would be a llot easier if it=
=20
were.
Unfortunately, my example is only Windows, but I get a couple people lookin=
g
over the code who might fix it, so.... If you want cross-platform ones, I
might be able to dig them up.

>Regards
>Pete
>

~[ WingZone ]~
http://wingzone.tripod.com/

=20
Technology=20=20
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10=
34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines=20
  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu