Open panjea opened 1 year ago
this is a great minimal library, thanks! it would be nice have std::thread as an ifdef option. these are my changes, not tested yet.
line 29
#ifdef KSEQPP_THREADS #include <thread> #endif
line 100
#ifdef KSEQPP_THREADS std::thread worker; /**< @brief worker thread */ #endif
line 430
inline void worker_join( ) { #ifdef KSEQPP_THREADS this->async_write( true ); if ( this->worker.joinable() ) this->worker.join(); #else this->async_write( false ); #endif } inline void worker_start( ) { #ifdef KSEQPP_THREADS this->worker = std::thread( &KStream::writer, this ); #else this->writer(); #endif }
Thanks @panjea for your suggestion! I'm curious to know in which use case you've found this feature helpful or necessary?
this is a great minimal library, thanks! it would be nice have std::thread as an ifdef option. these are my changes, not tested yet.
line 29
line 100
line 430