Overview
Features
Download
Documentation
Community
Add-Ons & Services
The POCO C++ Libraries Blog

Archive: September, 2008

NullMutex

Filed under: Uncategorized by peter at 09:07

As of revision 896 the POCO sourceforge trunk features a new class: the NullMutex (Poco/Mutex.h)

You now probably ask yourself: What’s so special about this class? Because – as the name suggests – it does nothing.
And that’s exactly why we needed it. Mostly all components of POCO are thread-safe. While this is generally a good thing, it also hurts performance when this thread-safeness is not needed.

The first classes to profit from this feature are all the classes from the caching and the events framework.

Events now have a second optional template parameter (which defaults to FastMutex) which allow you to specify the mutex. To disable thread-safeness for an event write:

Poco::BasicEvent<int, NullMutex>

The caching framework can benefit even more from this extension. Inserting an value into the cache requires a lock for the insert and then another lock when we fire the add event! In a full multithreaded environment all these locks are needed but what if you don’t care about the events at all and never register to them? Write

Poco::LRUCache<MyKey, MyValue, FastMutex, NullMutex>

to disable thread-safeness for the caches events only.

To additionally disable thread-safeness for the cache, write

Poco::LRUCache<MyKey, MyValue, NullMutex, NullMutex>

And if you don’t care about the mutex stuff at all? Then write

Poco::LRUCache<MyKey, MyValue>
Poco::BasicEvent<int>

as you used to do prior. The event/cache extensions are backwards compatible. When you don’t specify a mutex, a FastMutex is used per default.

POCO 1.3.3 RC1

Filed under: News by guenter at 17:13

I am happy to announce that the first release candidate for the upcoming 1.3.3 release is now ready. Those of you wanting to get a glimpse at it can download the tarball from here. The list of changes (over 50 bug fixes and enchancements) can be found here. Feedback is appreciated before we release the final 1.3.3 next week.

1.3.3 is coming

Filed under: News by guenter at 14:56

As those of you following the mailing list have probably noticed, a lot of bug squashing goes on currently. The reason is the upcoming 1.3.3 release, for which we’d like to fix most of the currently reported issues. The release candidate should be ready next Monday (Sept.22), after some more Data testing by Alex the final 1.3.3 release should be out one week later.