eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'BackgroundJob':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: BackgroundJob


Inheritance:

   Object
   |
   +--AbstractBackgroundJob
      |
      +--BackgroundJob

Package:
stx:libbasic2
Category:
System-Support
Version:
rev: 1.15 date: 2015/02/21 22:42:34
user: vrany
file: BackgroundJob.st directory: libbasic2
module: stx stc-classLibrary: libbasic2
Author:
Jan Vrany <jan.vrany@fit.cvut.cz>

Description:


A BackgroundJob for one-shot computation. When started, it performs it job
and terminates. User have to explicitly ask job to start again to 
perform new computation.


[instance variables:]

[class variables:]


Related information:

    BackgroundJob

Instance protocol:

processing
o  process
Actually perform the job. This method is called from the background worker thread

o  process: aBlock

start & stop
o  restart: aBlock
Restart the job, evaluationg aBlock instead of pre-configured job

o  start: aBlock
Start the job, evaluating aBlock instead of pre-configured `job`.

o  start: block withPriority: prio


Examples:


| job text | job := BackgroundJob named: 'example job' on:[ Delay waitForSeconds: 3. Transcript showCR:'One guy said: ', text ]. text := 'Hello world'. job restart. Delay waitForSeconds: 5. text := 'Ahoj Svete!'. job restart. Delay waitForSeconds: 1. text := 'Haya, I''m talking fast, you should not see the czech greeting'. job restart.

ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Thu, 19 Jul 2018 06:07:39 GMT