aboutsummaryrefslogtreecommitdiff
path: root/src/examples/demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/demo.c')
-rw-r--r--src/examples/demo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/examples/demo.c b/src/examples/demo.c
index 4a16b656..10890ebe 100644
--- a/src/examples/demo.c
+++ b/src/examples/demo.c
@@ -39,11 +39,18 @@
39#include <limits.h> 39#include <limits.h>
40#include <ctype.h> 40#include <ctype.h>
41 41
42#if defined(CPU_COUNT) && (CPU_COUNT+0) < 2
43#undef CPU_COUNT
44#endif
45#if !defined(CPU_COUNT)
46#define CPU_COUNT 2
47#endif
48
42/** 49/**
43 * Number of threads to run in the thread pool. Should (roughly) match 50 * Number of threads to run in the thread pool. Should (roughly) match
44 * the number of cores on your system. 51 * the number of cores on your system.
45 */ 52 */
46#define NUMBER_OF_THREADS 8 53#define NUMBER_OF_THREADS CPU_COUNT
47 54
48/** 55/**
49 * How many bytes of a file do we give to libmagic to determine the mime type? 56 * How many bytes of a file do we give to libmagic to determine the mime type?