platforms problems

Stefan Seifert nine at detonation.org
Thu Aug 2 20:49:26 UTC 2012


On Thursday 02 August 2012 15:46:45 Andy Dougherty wrote:

> For the threads tests, it sure seems like a race condition to me that is
> exposing a weakness in parrot's thread implementation.  Last time I
> looked, the tests were relying on sleep() calls.  That seems wrong and
> fragile to me.  No explicit sleep call should be needed.  The threading
> interface ought to supply the necessary functions to ensure things are in
> whatever state the tests are expecting.

The failing tests are not even threading related. They test callback 
functionality of the NCI interface. The reason for them to fail in the threads 
branch is that I changed the implementation of sleep() to use the timer 
thread.

The implementation of the timer thread is in src/alarm.c. I'm using the 
threading library abstraction makros from the previous threading 
implementation. Maybe they do not behave exactly like POSIX on all platforms? 
I could only test them on Linux and Windows.

> For the threads examples, I have no idea what they are actually supposed
> to do -- there's no documentation -- so I was never sure what was supposed
> to be happening with them, and couldn't usefully test them either.

Sorry, I still haven't come around to add the docs. For the time being, you 
can find descriptions in my bachelor thesis at 
http://niner.name/Hybrid_Threads_for_the_Parrot_VM.pdf chapter 7 (page 29-31)

Stefan


More information about the parrot-dev mailing list