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.
Alphabetic index Hierarchy of classes