Made Util::streamName and exitReason thread-local

This commit is contained in:
Thulinma 2020-08-28 19:23:48 +02:00
parent 7c6da9d455
commit 7423868de4
11 changed files with 40 additions and 32 deletions

View file

@ -14,8 +14,9 @@
/// Contains utility code, not directly related to streaming media
namespace Util{
extern uint32_t printDebugLevel;
extern std::string streamName; ///< Used by debug messages to identify the stream name
extern char exitReason[256];
extern __thread char streamName[256]; ///< Used by debug messages to identify the stream name
void setStreamName(const std::string & sn);
extern __thread char exitReason[256];
void logExitReason(const char *format, ...);
/// Deals with parsing configuration from commandline options.