diff --git a/panda/src/net/connectionReader.cxx b/panda/src/net/connectionReader.cxx index 57cb2b0bac..0ce2b4ce07 100644 --- a/panda/src/net/connectionReader.cxx +++ b/panda/src/net/connectionReader.cxx @@ -102,15 +102,20 @@ ConnectionReader:: ConnectionReader(ConnectionManager *manager, int num_threads) : _manager(manager) { -#if !defined(HAVE_THREADS) || defined(SIMPLE_THREADS) + if (!Thread::is_true_threads()) { + // There is no point in using threads for this kind of I/O unless + // we actually have real threads available (i.e. HAVE_THREADS is + // defined, and SIMPLE_THREADS is not). #ifndef NDEBUG - if (num_threads != 0) { - net_cat.error() - << "Threading support is not available.\n"; - } + if (num_threads != 0) { + if (net_cat.is_debug()) { + net_cat.debug() + << "Threading support is not available.\n"; + } + } #endif // NDEBUG - num_threads = 0; -#endif // HAVE_THREADS + num_threads = 0; + } _raw_mode = false; _tcp_header_size = datagram_tcp16_header_size; diff --git a/panda/src/net/connectionWriter.cxx b/panda/src/net/connectionWriter.cxx index 7937bddc6a..7b20e63911 100644 --- a/panda/src/net/connectionWriter.cxx +++ b/panda/src/net/connectionWriter.cxx @@ -67,8 +67,10 @@ ConnectionWriter(ConnectionManager *manager, int num_threads) : // defined, and SIMPLE_THREADS is not). #ifndef NDEBUG if (num_threads != 0) { - net_cat.error() - << "Threading support is not available.\n"; + if (net_cat.is_debug()) { + net_cat.debug() + << "Threading support is not available.\n"; + } } #endif // NDEBUG num_threads = 0;