diff options
author | Vincent Richard <[email protected]> | 2005-09-14 22:03:56 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-09-14 22:03:56 +0000 |
commit | 344d96539d6886fc8c071a7af718e4132743ecc8 (patch) | |
tree | 79c301487c422c0a30e8a2d51be3a1d336d2690e /src/platforms/posix/posixHandler.cpp | |
parent | Added special characters for encoding. (diff) | |
download | vmime-344d96539d6886fc8c071a7af718e4132743ecc8.tar.gz vmime-344d96539d6886fc8c071a7af718e4132743ecc8.zip |
Non-blocking socket input/output.
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 } |