On 01/09/2014 13:28, Piotr Trojanek wrote:
On Mon, Sep 1, 2014 at 1:19 PM, David Matthews
<[email protected]> wrote:
Piotr,
I don't know why it would only work sometimes. Whenever I've tested it it
has worked. However, the X-Windows/Motif code is very old and isn't really
maintained.
Thanks for your reply. So far I have two workarounds:
1) use lesstif2-0.95.2-1 instead of openmotif,
2) force poly to run on a single CPU core with 'taskset -c 0 poly' (my
machine has 4 cores).
That doesn't surprise me. I've had a quick look at the code and it does
fork off a new thread in XtAppInitialise. I suspect it then could have
race conditions if the subsequent Motif calls result in X-windows events
being scheduled. This is much more likely if there is a second core
around that can run the other thread as soon as it is unblocked.
A search with Google suggests that lesstif is thread-safe whereas
openmotif isn't. I have no idea whether that is actually true or
whether there is an error in the way Poly/ML uses Motif. If it works
with lesstif I'd tend to stick with it.
David
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml