This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. JobManager

1.1. Rationale

Most applications need to do some sort of data processing. In applications with GUI it is often required that application windows stay responsive to user interaction while processing happens in the background. There are various approaches to accomplishing that. JobManager is meant as a framework which focuses on the following things:

JobManager not only provides a hierarchy of abstract classes, but also useful implementations such as handler that uses thread pool. These subclasses can be used "out of the box" easily. Moreover, programmer can focus on providing processing logic and not on technical details concerning executing job itself - that is provided by JobManager.

1.2. Design

TBD.

1.3. Examples

1.3.1. ThreadPoolJobHandler

This class is provided in the core JobManager package. It uses a pool (of configurable size) of worker threads to accomplish given job. While thread programming can be tricky and often introduces hard-to-find bugs, centralized handling of threads usage reduces the maintenance efforts to a set of classes related to this handler.

1.3.2. JobManager in Straw

JobManager can be used for the following jobs:


2024-10-23 10:59