diff options
Diffstat (limited to 'src/platforms/posix/posixHandler.cpp')
-rw-r--r-- | src/platforms/posix/posixHandler.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platforms/posix/posixHandler.cpp b/src/platforms/posix/posixHandler.cpp index 48d96984..d3faa4d4 100644 --- a/src/platforms/posix/posixHandler.cpp +++ b/src/platforms/posix/posixHandler.cpp @@ -33,6 +33,10 @@ #include <string.h> +#ifdef _POSIX_PRIORITY_SCHEDULING + #include <sched.h> +#endif // _POSIX_PRIORITY_SCHEDULING + namespace vmime { namespace platforms { @@ -201,7 +205,11 @@ vmime::utility::childProcessFactory* posixHandler::getChildProcessFactory() cons void posixHandler::wait() const { +#ifdef _POSIX_PRIORITY_SCHEDULING + ::sched_yield(); +#else ::sleep(1); +#endif // _POSIX_PRIORITY_SCHEDULING } |