<commit_before>/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc.  All rights reserved."

#include "includes.h"

// execute the cachetable callbacks using a writer thread 0->no 1->yes
#if defined _WIN32
#define DO_WRITER_THREAD 0
#else
#define DO_WRITER_THREAD 1
#endif
#if DO_WRITER_THREAD
static void *cachetable_writer(void *);
#endif

// we use 4 threads since gunzip is 4 times faster than gzip
#define MAX_WRITER_THREADS 4

// use cachetable locks 0->no 1->yes
#define DO_CACHETABLE_LOCK 1

// unlock the cachetable while executing callbacks 0->no 1->yes
#define DO_CALLBACK_UNLOCK 1

// simulate long latency write operations with usleep. time in milliseconds.
#define DO_CALLBACK_USLEEP 0
#define DO_CALLBACK_BUSYWAIT 0

//#define TRACE_CACHETABLE
#ifdef TRACE_CACHETABLE
#define WHEN_TRACE_CT(x) x
#else
#define WHEN_TRACE_CT(x) ((void)0)
#endif

typedef struct ctpair *PAIR;
struct ctpair {
    enum typ_tag tag;
    char     dirty;<commit_msg>addresses #1261 enable writer cache thread<commit_after>/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc.  All rights reserved."

#include "includes.h"

// execute the cachetable callbacks using a writer thread 0->no 1->yes
#define DO_WRITER_THREAD 1
#if DO_WRITER_THREAD
static void *cachetable_writer(void *);
#endif

// we use 4 threads since gunzip is 4 times faster than gzip
#define MAX_WRITER_THREADS 4

// use cachetable locks 0->no 1->yes
#define DO_CACHETABLE_LOCK 1

// unlock the cachetable while executing callbacks 0->no 1->yes
#define DO_CALLBACK_UNLOCK 1

// simulate long latency write operations with usleep. time in milliseconds.
#define DO_CALLBACK_USLEEP 0
#define DO_CALLBACK_BUSYWAIT 0

//#define TRACE_CACHETABLE
#ifdef TRACE_CACHETABLE
#define WHEN_TRACE_CT(x) x
#else
#define WHEN_TRACE_CT(x) ((void)0)
#endif

typedef struct ctpair *PAIR;
struct ctpair {
    enum typ_tag tag;
    char     dirty;
{'fraction_non_alphanumeric': 0.09282051282051282, 'fraction_numerical': 0.028205128205128206, 'mean_word_length': 4.511299435028248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4781295', 'n_tokens_mistral': 714, 'n_tokens_neox': 640, 'n_words': 230}