class DataPool.h

Thread safe data storage

o class DataPool: public GPEnabled
Thread safe data storage.
Files "DataPool.h" and "DataPool.cpp" implement classes DataPool and DataRange used by DjVu decoder to access data.

The main goal of class DataPool is to provide concurrent access to the same data from many threads with a possibility to add data from yet another thread. It is especially important in the case of the Netscape plugin when data is not immediately available, but decoding should be started as soon as possible. In this situation it is vital to provide transparent access to the data from many threads possibly blocking readers that try to access information that has not been received yet.

When the data is local though, it can be accessed directly using standard IO mechanism. To provide a uniform interface for decoding routines, DataPool supports file mode as well.

Author:
Andrei Erofeev <eaf@geocities.com>, Léon Bottou <leonb@research.att.com>
Version:
$Id: DataPool.h.html,v 1.12 2001/02/15 01:12:21 bcr Exp $

Alphabetic index Hierarchy of classes


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.