I'm very excited about this branch, and I think there is a lot of opportunity to both improve existing applications with new threading support, but also to improve this implementation to further increase performance and features over time.
I had promised to add the missing windows support for green threads, but I have since lost access to the windows box I was using for development and haven't been able to follow through with that promise. I am going to try to set up a virtual machine and see what kind of progress I can make there. If anybody else is able to help with this work in any way, even just being available to answer the inevitable questions about how the heck windows timers work, that would be great. This is a pretty big deal, and we don't want to rush to merge it but we also don't want to wait forever. We would like to start making threading available, especially to Rakudo, soon. I think it's reasonable to expect we can merge it by 4.6.0 or earlier, if people look at it, test it, and like it. Thanks, --Andrew Whitworth On Mon, Apr 16, 2012 at 10:50 AM, Stefan Seifert <[email protected]> wrote: > Dear parrot developers, > > I made a lot of progress on the threads branch these past few months. > Threading works as outlined in my bachelor's thesis at: > http://niner.name/Hybrid_Threads_for_the_Parrot_VM.pdf > > The branch is up to date with regards to the current master. It passes > fulltest with gcc and g++ on my machine. It also passes Rakudo's spectest > except for a failure in t/spec/S11-modules/require.t which I also see in > master. > > Using moritz++' mandelbrot-color.pl on an optimized Parrot build as a > benchmark I could not measure any performance degradation. In fact threads was > even a bit faster than master, but this is surely within the error margin. > > I got a couple of test programs in examples/threads which demonstrate how to > use the new threading capabilities. > > Though the threading support itself uses the old OS abstraction macros and > thus should work on Windows as well, green threads still don't. And since > green threads are used for supporting threading, there's still no progress > there. On the other hand, there's not much that's missing: we just need > replacements for POSIX alarms and pipes. In other words: some timer and a > means for having threads block and wait for new work if idle so they don't > burn CPU. Sounds like standard threading tutorial examples and a quick fix for > someone with a Windows programming environment handy. > > So I guess it's time to throw a couple of more eyeballs at this branch. It > will also offer plenty of opportunity for further improvements. It's got > everything from a beginner's exercise like making the number of threads > configurable or even auto-tuned to the number of available CPU cores to > challenges like getting rid of the locks in the GC. > > And of course, simply using it in real programs will turn up some hidden bugs > and limitations which might warrant some fixes as well ;) > > Regards, > Stefan > _______________________________________________ > http://lists.parrot.org/mailman/listinfo/parrot-dev > _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
