66#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(_NetBSD_) || defined(__sun)
68#elif defined(BOOST_WINDOWS)
69 ::SetPriorityClass(::GetCurrentProcess(), HIGH_PRIORITY_CLASS);
70#elif defined(BOOST_HAS_PTHREADS)
73 int max_prio_for_policy = 0;
75 ::pthread_attr_init(&attr);
76 ::pthread_attr_getschedpolicy(&attr, &policy);
77 max_prio_for_policy = ::sched_get_priority_max(policy);
79 if (0 != ::pthread_setschedprio(::pthread_self(), max_prio_for_policy))
81 std::cout <<
"pthread_setschedprio - ERROR" << std::endl;
84 ::pthread_attr_destroy(&attr);