Is this client thread safe?

Moved from GitHub pydgraph/105

Posted by zealot-shin:

trying to using pydgraph, i’m wondering if this client is thread safe.
can i share one client instance between different processes?

from what i’v leant in dgraph doc, it seems that transactional conflicts will cause oprations on hold.
i guess it’s best not to share client instance in multi process.

what i concerned is performance. if multi process could help improve performance, i’d like to make it that way. Or if one client instance only is enough for most use cases, i can design my program based on this concept.

martinmr commented :

This is not supported in pydgraph because gRPC does not work correctly in python with multiple threads/processes.

You can create a client with multiple connections and they will be load balanced for you.