POV-Ray : Newsgroups : povray.beta-test : thread count rendertimes unpredictable? : Re: thread count rendertimes unpredictable? Server Time
28 Jul 2024 18:15:49 EDT (-0400)
  Re: thread count rendertimes unpredictable?  
From: clipka
Date: 25 Jan 2009 08:10:00
Message: <web.497c63a1dd1e5b353c6235530@news.povray.org>
I just noticed the following comment in povray.cpp, function povray_init():

    // we can't use boost::thread::yield here since under windows it is not
    // guaranteed to give up a time slice [see API docs for Sleep(0)]
    // TODO - Maybe boost::thread under Windows needs a patch! [trf]
    while(POV_RenderContext == NULL)
    {
        boost::thread::yield();
        pov_base::Delay(50);
    }

This pattern of calling both boost::thread::yield() together with
pov_base::Delay() is used throughout POV-Ray, except for the functions
MainThreadFunction() in povray.cpp and vfeSession::WorkerThread() in
vfesession.cpp, which makes me wonder whether this is intended.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.