Gtk2::CV::Jobber - a job queue mechanism for Gtk2::CV


  use Gtk2::CV::Jobber;


%Gtk2::CV::Jobber::job [READ-ONLY]

Global variable containing all jobs, indexed by full path.

Gtk2::CV::Jobber::define $type, [option => $value, ...], $cb

Register a new job type identified by $type. The callback will be called with ($cont, $path, $type), and has to call &$cont once it has finished processing.

 pri     => number
 read    => whether reading the file contents ahead of time is useful
 stat    => whether stating the object ahead of time is useful
 fork    => (lots of restrictions)
 class   =>
 maxread =>
 hide    => true if the file(spec) will go away via this job
 cb      => callback
Gtk2::CV::Jobber::submit $type, $path, $data

Submit a new job of the given type.

Gtk2::CV::Jobber::inhibit { ... }

Disable/re-enable execution of background jobs. When disabled, active jobs will finish, but no new jobs will be started until jobs are enabled again. Calls can be nested.

The Gtk2::CV::Jobber::Job class



The job type.


The full path to the file.


The original user data passed to add.


And arrayref of statdata if stat is requested for given job class.


The open filehandle to the file and the beginning of the file when reading is requested for the given job class.



Has to be called by the callback when the job has finished.

The Gtk2::CV::Jobber::Client class


To be called when creating a new object instance that wants to listen to jobber updates.

$self->jobber_update ($job)

The given job has finished.


Marc Lehmann <>