KMail::JobScheduler Class Reference

#include <jobscheduler.h>

Inherits TQObject.

Public Member Functions

 JobScheduler (TQObject *parent, const char *name=0)
 
void registerTask (ScheduledTask *task)
 
void notifyOpeningFolder (KMFolder *folder)
 
void pause ()
 
void resume ()
 

Detailed Description

The unique JobScheduler instance (owned by kmkernel) implements "background processing" of folder operations (like expiration and compaction).

Tasks (things to be done) are registered with the JobScheduler, and it will execute them one at a time, separated with a 1-minute timer. The jobs themselves should use timers to avoid using too much CPU for too long. Tasks for opened folders are not executed until the folder is closed.

Definition at line 96 of file jobscheduler.h.

Member Function Documentation

◆ notifyOpeningFolder()

void JobScheduler::notifyOpeningFolder ( KMFolder folder)

Called by [implementations of] FolderStorage::open() Interrupt any running job for this folder and re-schedule it for later.

Definition at line 102 of file jobscheduler.cpp.

◆ registerTask()

void JobScheduler::registerTask ( ScheduledTask task)

Register a task to be done for a given folder The ownership of the task is transferred to the JobScheduler.

Definition at line 57 of file jobscheduler.cpp.


The documentation for this class was generated from the following files: