diff --git a/README.md b/README.md index cd3bfb4..1c99dd9 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Here is a list of features: * Single-threaded * Ergonomic API +Note: This library is beta-quality software as some essential features are still being implemented. + ## Getting Started The library is distributed as a single amalgamated `chttp.c` file or as a static library, so you can: diff --git a/examples/server/030_using_workers.c b/examples/server/030_using_workers.c index d00a0a4..9fac4de 100644 --- a/examples/server/030_using_workers.c +++ b/examples/server/030_using_workers.c @@ -2,23 +2,6 @@ #include #include -#ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#include -typedef void* Thread; -typedef unsigned long ThreadReturn; -typedef CRITICAL_SECTION Mutex; -typedef CONDITION_VARIABLE Condvar; -#endif - -#ifdef __linux__ -#include -typedef pthread_t Thread; -typedef void* ThreadReturn; -typedef pthread_mutex_t Mutex; -typedef pthread_cond_t Condvar; -#endif - // !!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // // // // This example is just a proof of concept for now as the library // @@ -42,6 +25,23 @@ typedef pthread_cond_t Condvar; // When the thread has finished, it can just call the usual // functions to produce a response. +#ifdef _WIN32 +#define WIN32_LEAN_AND_MEAN +#include +typedef void* Thread; +typedef unsigned long ThreadReturn; +typedef CRITICAL_SECTION Mutex; +typedef CONDITION_VARIABLE Condvar; +#endif + +#ifdef __linux__ +#include +typedef pthread_t Thread; +typedef void* ThreadReturn; +typedef pthread_mutex_t Mutex; +typedef pthread_cond_t Condvar; +#endif + // The following types are used to describe a job the worker // needs to work on. typedef enum {