poetix

this time for sure

Tripoli on SourceForge

Tripoli now has a SourceForge project page.

The multiple-readers-one-writer locking class from the synchronization module was adapted and improved by Matthew Scott and turned into a handy Python Cookbook recipe.

Part of Matthew’s motivation for writing his own version of this code was that he needed to use it in a non-GPL project, and all of Tripoli is currently licensed under the GPL. I don’t in fact believe that library code - in particular the implementation of generic methods and techniques - requires the protections of the full GPL: once the technique is known, there is little that can be done to it in the way of proprietory modification. So the next release of Tripoli will probably be split into two packages, an application package under the GPL and a library package (including the concurrent Python classes) under the LGPL.

The cookbook recipe has two other significant advantages over my original code: it’s re-entrant, and it’s unit tested. I’ve been working on making my own implementation re-entrant, and creating some appropriate tests for it: these also will be in the next release. My approach to re-entrancy is slightly different to Matthew’s, in that the original non-reentrant class is kept as it is and a re-entrant wrapper provided for it. This makes for a cleaner design, in my view. I’m also looking at some ways of supporting some common patterns in testing multi-threading code.

Once the MrowLock updates are done, I’ll start on a proper HTTP-based Tripoli server - the current XML-RPC version was just a quick hack to get something working.