GumpacG commented on code in PR #3434: URL: https://github.com/apache/tinkerpop/pull/3434#discussion_r3335290989
########## gremlin-js/gremlin-javascript/lib/driver/remote-connection.ts: ########## Review Comment: If sessions are being removed, should this be removed as well? ########## gremlin-dotnet/src/Gremlin.Net/Driver/RemoteTransaction.cs: ########## @@ -0,0 +1,270 @@ +#region License + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Gremlin.Net.Driver.Messages; +using Gremlin.Net.Driver.Remote; +using Gremlin.Net.Process.Traversal; + +namespace Gremlin.Net.Driver +{ + /// <summary> + /// Controls an explicit remote transaction. Created via + /// <c>GremlinClient.Transact()</c> or <c>g.Tx()</c>. + /// The transaction is not started until <see cref="BeginAsync"/> is called. + /// + /// All submissions are serialized internally via a semaphore to guarantee + /// the server receives requests in order, even if the caller does not await + /// each call before issuing the next. + /// + /// This class is NOT thread-safe. Do not share a RemoteTransaction across + /// multiple threads without external synchronization. + /// </summary> + public class RemoteTransaction : IGremlinClient, IAsyncDisposable + { + private readonly IGremlinClient _client; + private readonly string _traversalSource; + // Serializes all submissions to guarantee ordering. Matches the role of + // Java's synchronized on HttpRemoteTransaction.submitInternal. Review Comment: I think we can remove this line. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
