Graph thread safety

classic Classic list List threaded Threaded
4 messages Options
mae
Reply | Threaded
Open this post in threaded view
|

Graph thread safety

mae
Good morning,

I'm considering to use graph-tool as a part of a python web-service
providing graph analysis features. Graph-tool performance looks really
promising, but I'm not sure if it fits my case. I would like to load graph
into the memory and share/read it between multiple threads/processes (to
handle many requests in parallel to the same graph). Is Graph thread safe?
For me it seems that it's not, but I would like to confirm it.

Best Regards,

Damian



--
Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: Graph thread safety

Tiago Peixoto
Administrator
Am 21.06.2018 um 07:43 schrieb mae:
> Good morning,
>
> I'm considering to use graph-tool as a part of a python web-service
> providing graph analysis features. Graph-tool performance looks really
> promising, but I'm not sure if it fits my case. I would like to load graph
> into the memory and share/read it between multiple threads/processes (to
> handle many requests in parallel to the same graph). Is Graph thread safe?
> For me it seems that it's not, but I would like to confirm it.

Non-modifying operations to Graph are thread-safe.

Best,
Tiago

--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: Graph thread safety

M. Vigouroux
how do you share/read graph object between multiple threads/processes ?



--
Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: Graph thread safety

Tiago Peixoto
Administrator
Am 02.07.2018 um 13:52 schrieb M. Vigouroux:
> how do you share/read graph object between multiple threads/processes ?

The same way you do with anything else.

Remember, however, that relying on the Python API to do multithreading is
largely hampered by Python's GIL, and multiprocessing can be costly.


--
Tiago de Paula Peixoto <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>