Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]


A.65 SOFTWARE-EVOLUTION-LIBRARY/UTILITY/TASK

Generic Function: process-task [sel/utility/task] task runner

Process the object, including evaluate fitness, push new Jobs, and store interesting results

Method: process-task [sel/utility/task] (task task-item) runner

Evaluate the task saving the result in the runner.

Method: process-task [sel/utility/task] (task some-test-task) runner

Process a single task by applying some-task-pred to the object in task. note: Since ‘task-save-result’ pushes results to a list, it’s possible for up to n results to be saved (where n is the number of running threads), so ‘first’ should be used to retrieve one result. Additionally, due to differences in timing, it’s possible that the result won’t match that of ‘some’, since ‘some’ promises to find the first while ‘some-task’ may return any element satisfying ‘some-task-pred’.

Structure: task-runner [sel/utility/task]

Class precedence list: task-runner, structure-object, slot-object, t

The state needed to run multi-threaded tasks and associated jobs.

Class: some-task [sel/utility/task]

Class precedence list: some-task, task, standard-object, slot-object, t

Slots:

Task for applying ‘some’ in parallel. The object field is a list on whose elements some-task-pred is applied.

Class: some-test-task [sel/utility/task]

Class precedence list: some-test-task, task, standard-object, slot-object, t

Slots:

Task to apply predicate some-task-pred to object.

Class: task [sel/utility/task]

Class precedence list: task, standard-object, slot-object, t

Base class for all task classes.

Class: task-map [sel/utility/task]

Class precedence list: task-map, task, standard-object, slot-object, t

Task object used to map a function over a sequence using workers.

Variable: *task-runner* [sel/utility/task]

Bind *task-runner* for worker threads

Macro: run-as-task [sel/utility/task] (task runner) &body body

Run the body code as a one-off task, which can access task and runner by name. The supplied names may be any available symbols. Returns the task-runner object.

Function: run-task [sel/utility/task] task &optional num-workers

Create a task-runner, using the specified task as the first job.

Function: run-task-and-block [sel/utility/task] task &optional num-workers

Create a task-runner, using the specified task as the first job, blocking until completion

Function: simple-task-async-runner [sel/utility/task] num-threads func arguments

Run function with arguments as a ‘simple-job’ ‘task-job’.

Generic Function: task-job [sel/utility/task] task runner

Return a job for the *jobs* stack. This is a function which, when called, returns the next task in the series.

Method: task-job [sel/utility/task] (task task-map) runner

Return a function which will spawn jobs for all of TASK’s objects.

Method: task-job [sel/utility/task] (task some-task) runner

Return the generating function for ‘some-task’. Create new subtasks for each item in the list until either applying the predicate some-task-pred in task succeeds or there are no more items in the list.

Function: task-map [sel/utility/task] num-threads function objects

Run function over objects using a ‘simple-job’ ‘task-job’.

Function: task-map-async [sel/utility/task] num-threads func objects

Run func over objects using a ‘simple-job’ ‘task-job’.

Function: task-runner-create-worker [sel/utility/task] runner

Create a new worker thread.

Function: task-runner-remaining-jobs [sel/utility/task] runner

Returns the number of jobs remaining.

Function: task-runner-workers-count [sel/utility/task] runner

Returns the number of running threads.

Function: task-save-result [sel/utility/task] runner obj

Save a result object.


Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]