gui.jobs.JobResult

gui.jobs.JobResult(generation, value=None, error=None)

The outcome of one run of a job.

Attributes

Name Type Description
generation int The number InProcessJob.start returned for the run.
value Any What the function returned, or None if it raised.
error BaseException | None The exception the function raised, or None.

Examples

from spotregen.gui.jobs import InProcessJob

job = InProcessJob(lambda: 6 * 7)
job.start()
print(job.wait())
JobResult(generation=1, value=42, error=None)