Due to the use of global data the goap library can only be called by a single thread.
static astarnode_t opened[ MAXOPEN ]; //!< The set of nodes we should consider.
static astarnode_t closed[ MAXCLOS ]; //!< The set of nodes we already visited.
static int numOpened = 0; //!< The nr of nodes in our opened set.
static int numClosed = 0; //!< The nr of nodes in our closed set.
If these were added to a struct that was passed in to the various functions, it would provide thread safety.
Due to the use of global data the goap library can only be called by a single thread.
static astarnode_t opened[ MAXOPEN ]; //!< The set of nodes we should consider. static astarnode_t closed[ MAXCLOS ]; //!< The set of nodes we already visited.
static int numOpened = 0; //!< The nr of nodes in our opened set. static int numClosed = 0; //!< The nr of nodes in our closed set.
If these were added to a struct that was passed in to the various functions, it would provide thread safety.