100 CPU on Win2k
Filip Konvička
filip.konvicka at logis.cz
Mon Jan 29 09:52:01 CET 2007
Hi,
first, be sure to replace
System(print:Show)
with
System(show:Show)
Trying to reduce the code that exhibits the same behavior (on WinXP SP1)
I ended up with
functor define{_}end
What is surprising to me is that I tried to change my console and GUI
programs to do this at startup, but they never eat 100%CPU.
However, doing this in the OPI does *not* eat 100%CPU. So maybe it is
somehow related to stdio?
Cheers,
Filip
> Hello all
>
> I use Mozart Engine 1.3.2 (20060615) playing Oz 3.
> Windows 2000 SP4.
>
> Tried a little variation from tutorial of Oz:
> http://www.mozart-oz.org/documentation/tutorial/node8.html#label48
>
> Just changed Browse to Show:
> functor
> import
> System(print:Show)
> %Browser(browse:Browse) %Import Browse form Browser module
> define
> proc {Ping N}
> if N==0 then {Show 'ping terminated'}
> else {Delay 5000} {Show ping} {Ping N-1} end
> end
> proc {Pong N}
> {For 1 N 1
> proc {$ I} {Delay 6000} {Show pong} end }
> {Show 'pong terminated'}
> end
> in
> {Show 'game started'}
> %{Ping 10}
> %{Pong 10}
> thread {Ping 50} end
> thread {Pong 50} end
> end
>
> Compiled:
> ozc -x PingPong.oz
>
> When i run the output exe file, ozengine.exe is taking 100% CPU.
>
> I checked this same program on Linux (previous version though) and all
> is well.
>
> Do you get the same behavior? Is that a bug ?
>
> Thanks,
> Gal
>
>
> ------------------------------------------------------------------------
>
> _________________________________________________________________________________
> mozart-users mailing list mozart-users at mozart-oz.org
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
More information about the mozart-users
mailing list