[erlang-questions] Does Wx need smp??
Fri May 29 10:52:38 CEST 2009
wxWidgets must run in it's own thread, and the functions used in erlang driver interface
to communicate with the emulator is only thread safe in an smp emulator.
With some work you could wrap that functionality, send it to the erlang thread first and
call the functions from the emulator thread on an non smp enabled erlang.
But that is work that I don't have time with and nowadays smp machines are everywhere,
e.g. my 6 year old PC is hyperthreaded and seen as an smp machine.
Angel Alvarez wrote:
> El Martes, 26 de Mayo de 2009 Steve Davis escribió:
>> Hello Angel,
>> Yep, wx does require SMP, the reason being that the underlying (cpp)
>> library code is required to run in a separate OS thread.
>> The erl flag you want is -smp enable. If running under windows you
>> must use werl not erl.
>> To be fair, after taking a quick look at the official docs (both user
>> guide and ref manual), this requirement is far from clear.
> Sorry, my fault!
> Niko (the packager whose rpm i picked up ) told me that, i wanted to just to probe new features
> so basically i ignored the docs....(like a good newbie :-) )
> IMHO this is not very elegant as the purity of process isolation is gone.
> Was performance the key on introducing such a complex driver? im very new
> to just make this judgement but for the whole thing (minus opengl and the like)
> it seems enough a stdin/pipe interface than making a big driver.
> Perhaps memory conservation is another issue (well is erlang VM better at managing
> memory than a full blow C++ aplication??? ).
> Just checking
> shows a bif efort to catch deleted objects and try to be in sync with the pure erlang side...
> its not criticism, but mere curiosity, design questions are very educative.
> Regards, Angel
> PS: Ive just found http://wxerlang.sourceforge.net/docs/Report.pdf seems very promising for insigths..!
More information about the erlang-questions