Skip to content

Multiple worker threads #63

@alahiff

Description

@alahiff

If you have a loop creating many runs within the same code a new worker thread is created on each iteration. With this simple example code you end up with 10 worker threads:

from simvue import Run

if __name__ == "__main__":
    count = 0
    while count < 10:
        with Run() as run:
            run.init()
        count += 1

This is not surprising, as the worker thread only exits when the parent exits.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions