Skip to content

Model is not threadsafe #450

@chrisdembia

Description

@chrisdembia

I am trying to use a Model in a multithreaded setting. I had a separate State per thread, but wanted to share the model between threads. This led to confusing errors. I then created a separate Model per thread, and my problem went away.

It would be nice if the Models were threadsafe. My intuition was that all I would need are separate State objects, if we consider our models/system to be "const". However, if this is hard to fix, it may not be worth it, because the fix is to just use multiple copies of the model. If we decide not to make models threadsafe, then we can maybe just mention in doxygen that they aren't threadsafe.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions