<commit_before>#ifndef __terark_db_table_store_hpp__
#define __terark_db_table_store_hpp__

#include "db_store.hpp"
#include "db_index.hpp"
//#include <tbb/queuing_rw_mutex.h>
#include <tbb/spin_rw_mutex.h>

namespace terark {
	class BaseDFA; // forward declaration
} // namespace terark

namespace terark { namespace db {

//typedef tbb::queuing_rw_mutex           MyRwMutex;
typedef tbb::spin_rw_mutex              MyRwMutex;
//typedef tbb::speculative_spin_rw_mutex  MyRwMutex;

typedef MyRwMutex::scoped_lock MyRwLock;

class TERARK_DB_DLL ReadableSegment;
class TERARK_DB_DLL ReadonlySegment;
class TERARK_DB_DLL WritableSegment;
typedef boost::intrusive_ptr<ReadableSegment> ReadableSegmentPtr;
typedef boost::intrusive_ptr<WritableSegment> WritableSegmentPtr;

// is not a WritableStore
class TERARK_DB_DLL CompositeTable : public ReadableStore {<commit_msg>use queuing_rw_mutex, because tbb::spin_rw_mutex is not scalable<commit_after>#ifndef __terark_db_table_store_hpp__
#define __terark_db_table_store_hpp__

#include "db_store.hpp"
#include "db_index.hpp"
#include <tbb/queuing_rw_mutex.h>
//#include <tbb/spin_rw_mutex.h>

namespace terark {
	class BaseDFA; // forward declaration
} // namespace terark

namespace terark { namespace db {

typedef tbb::queuing_rw_mutex           MyRwMutex;
//typedef tbb::spin_rw_mutex              MyRwMutex;
//typedef tbb::speculative_spin_rw_mutex  MyRwMutex;

typedef MyRwMutex::scoped_lock MyRwLock;

class TERARK_DB_DLL ReadableSegment;
class TERARK_DB_DLL ReadonlySegment;
class TERARK_DB_DLL WritableSegment;
typedef boost::intrusive_ptr<ReadableSegment> ReadableSegmentPtr;
typedef boost::intrusive_ptr<WritableSegment> WritableSegmentPtr;

// is not a WritableStore
class TERARK_DB_DLL CompositeTable : public ReadableStore {
{'fraction_non_alphanumeric': 0.07692307692307693, 'fraction_numerical': 0.0, 'mean_word_length': 6.333333333333333, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1974903', 'n_tokens_mistral': 645, 'n_tokens_neox': 617, 'n_words': 126}