65#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(_NetBSD_) || defined(__sun)
67#elif defined(BOOST_WINDOWS)
68 ::SetPriorityClass(::GetCurrentProcess(), HIGH_PRIORITY_CLASS);
69#elif defined(BOOST_HAS_PTHREADS)
72 int max_prio_for_policy = 0;
74 ::pthread_attr_init(&attr);
75 ::pthread_attr_getschedpolicy(&attr, &policy);
76 max_prio_for_policy = ::sched_get_priority_max(policy);
78 if (0 != ::pthread_setschedprio(::pthread_self(), max_prio_for_policy))
80 std::cout <<
"pthread_setschedprio - ERROR" << std::endl;
83 ::pthread_attr_destroy(&attr);