Making it clear that it may disappear.

This commit is contained in:
Daniel Lemire 2020-06-26 13:29:50 -04:00
parent 6c33f518a8
commit 67b3595008
2 changed files with 6 additions and 7 deletions

View File

@ -117,7 +117,12 @@ if(SIMDJSON_ENABLE_THREADS)
endif()
# Some users compile simdjson with thread support but still do not want simdjson to use threads.
option(SIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT "Whether we enabled thread support or not (SIMDJSON_ENABLE_THREADS), do not use threads. This option does nothing when thread support is not enabled." OFF)
#
# Important : Expect this option to disappear in the future.
#
option(SIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT "Whether we enabled thread support or not (SIMDJSON_ENABLE_THREADS), do not use threads.\
This option does nothing when thread support is not enabled. We reserve the right to remove this option in a future release in\
favor of a runtime approach." OFF)
if(SIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT)
target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT=1)
endif()

View File

@ -101,12 +101,6 @@ A `document_stream` instance uses at most two threads: there is a main thread an
You should expect the main thread to be fully occupied while the worker thread is partially busy
(e.g., 80% of the time).
If you compile simdjson with thread support and you still do not want simdjson to use threads,
you can forcefully disable them by setting the SIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT macro
to 1 in C++, or by passing SIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT=ON to cmake. It is a
compile-time decision: if you disable the threads with SIMDJSON_DO_NOT_USE_THREADS_NO_MATTER_WHAT,
you will not be able to use threads in simdjson unless you recompile.
Support
-------