Logo Search packages:      
Sourcecode: djvulibre version File versions

bool DjVuDocument::wait_for_complete_init ( void   ) 

Waits until the document initialization process finishes. It can finish either successfully or not. Use {is_init_ok}() and {is_init_failed}() to learn the result code.

As described in {start_init}(), for multi-threaded applications the initialization is carried out in parallel with the main thread. This function blocks the calling thread until the initializing thread reads enough data, receives information about the document format and exits. This function returns true# if the initialization is successful. You can use {get_flags}() or {is_init_complete}() to check more precisely the degree of initialization. Use {stop_init}() to interrupt initialization.

Definition at line 457 of file DjVuDocument.cpp.

References GMonitor::enter(), GMonitor::leave(), and GMonitor::wait().

Referenced by init().

  while(!(flags & DOC_INIT_FAILED) &&
        !(flags & DOC_INIT_OK)) flags.wait();
  while (!(init_thread_flags & FINISHED))
  return (flags & (DOC_INIT_OK | DOC_INIT_FAILED))!=0;

Generated by  Doxygen 1.6.0   Back to index