message: Add SetThreadPriority function
diff: #include <boost/signals2/signal.hpp>
  #include <boost/thread/exceptions.hpp>
  +#ifndef WIN32
  +#include <sys/types.h>
  +#include <sys/time.h>
  +#include <sys/resource.h>
  +#endif
  +
  static const bool DEFAULT_LOGTIMEMICROS = false;
  static const bool DEFAULT_LOGIPS = false;
  static const bool DEFAULT_LOGTIMESTAMPS = true;
  @@ -203,6 +209,30 @@ std::string HelpMessageOpt(const std::string& option, const std::string& message
  */
  int GetNumCores();
  +#ifdef WIN32
  +inline void SetThreadPriority(int nPriority)
  +{
  + SetThreadPriority(GetCurrentThread(), nPriority);
  +}
  +#else
  +
  +#define THREAD_PRIORITY_LOWEST PRIO_MAX
  +#define THREAD_PRIORITY_BELOW_NORMAL 2
  +#define THREAD_PRIORITY_NORMAL 0
  +#define THREAD_PRIORITY_ABOVE_NORMAL 0
  +
  +inline void SetThreadPriority(int nPriority)
  +{
  + // It's unclear if it's even possible to change thread priorities on Linux,
  + // but we really and truly need it for the generation threads.
  +#ifdef PRIO_THREAD
  + setpriority(PRIO_THREAD, 0, nPriority);
  +#else
  + setpriority(PRIO_PROCESS, 0, nPriority);
  +#endif
  +}
  +#endif
  +
  void RenameThread(const char* name);
  /**
  