Logo Search packages:      
Sourcecode: qcomicbook version File versions  Download package

void ImgLoaderThread::run (  )  [protected, virtual]

Main function of the thread.

Preloads requested pages from requests list using sink->getImage(). Stop if stopped flag is true.

See also:
ImgDirSink::getImage

Definition at line 82 of file imgloader.cpp.

References QComicBook::ImgDirSink::getImage(), mtx, and requests.

{
      for (;;)
      {
            mtx.lock();
            if (stopped || requests.empty())
            {
                  mtx.unlock();
                  break;
            }
            
            const int n = requests.first();
            requests.pop_front();
            if (sink)
            {
                  int result;
                  sink->getImage(n, result);
            }
            mtx.unlock();
      }
}


Generated by  Doxygen 1.6.0   Back to index