Date
1 - 4 of 4
What are the advantages of using CreateThreadedTx in Multithreading if we can explicitly share the transaction object?
"Suriya.Rajasekar" <suriya.ja...@...>
Hi, If we can share the transaction object among multiple threads such that they work concurrently in the same transaction and are able to see each other's operation. Then what are the advantages of using CreateThreadedTx() in multithreading ?How is it different from just sharing the transaction object among threads ? Thanks Suriya |
|
Stephen Mallette <spmal...@...>
I'm not sure that I follow your question because I'm not sure what "transaction object" you're sharing among threads to be able to see each other's operations. That is precisely the object that graph.tx().createThreadedTx() establishes. If you don't use that object then different threads will establish transactions within a separate ThreadLocal and they won't see each others changes. On Mon, May 11, 2020 at 7:49 PM Suriya.Rajasekar <suriya.ja...@...> wrote:
|
|
"Suriya.Rajasekar" <suriya.ja...@...>
Hi Stephen, Thank you for your response. I would like to know the difference between graph.newTransaction() and graph.tx().createThreadedTx() in a multithreaded environment. On Tuesday, May 12, 2020 at 6:23:36 AM UTC-7, Stephen Mallette wrote:
|
|
Stephen Mallette <spmal...@...>
Hmm - someone might correct me, but I don't think that there is a difference: I think you would want to prefer the TinkerPop method call though of graph.tx().createThreadedTx() rather than the underlying JanusGraph one though. On Tue, May 12, 2020 at 12:58 PM Suriya.Rajasekar <suriya.ja...@...> wrote:
|
|