Skip to content

Singleton-based approach breaks multi-threading. #8

@sniggyfigbat

Description

@sniggyfigbat

As far as I can tell there is no reason why Path Algorithm specialisations need to be singletons; it provides no particular benefit (to AStar, anyway) and it prevents the library from working properly in multithreaded workloads. The fix is trivial, simply allowing the Pathfinder class to create a new instance of the algorithm class and using that (and making sure to call clear() before returning the found path).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions