GrammaTech / gtirb

Intermediate Representation for Binary analysis and transformation
https://grammatech.github.io/gtirb/
Other
305 stars 36 forks source link

Thread safety #2

Closed AaronBallman closed 6 years ago

AaronBallman commented 6 years ago

Node::uuidMap is not thread safe, but users have no way to protect against data races against it. I know we aren't intending to use multithreading this library, but we shouldn't provide unsafe APIs that prevent the user from doing their own concurrency.

I think we should design the APIs such that the user can use the APIs in a thread-safe manner, even if we don't use multiple threads ourselves.

tjohnson-gt commented 6 years ago

I think this is the right philosophy we should be aiming for.

AaronBallman commented 6 years ago

This can be closed as it was merged to master. Users are able to protect the Context object now.