Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
POC for MaxDispatches
Browse files Browse the repository at this point in the history
bentoi committed Aug 1, 2024
1 parent 2f63b48 commit 6aadb09
Showing 12 changed files with 1,524 additions and 1,387 deletions.
1 change: 1 addition & 0 deletions config/PropertyNames.xml
Original file line number Diff line number Diff line change
@@ -212,6 +212,7 @@ generated from the section label.
<suffix name="EnableIdleCheck" default="1" />
<suffix name="IdleTimeout" default="60" />
<suffix name="InactivityTimeout" default="300" />
<suffix name="MaxDispatches" default="0" />
</class>

<class name="threadpool" prefix-only="true">
143 changes: 94 additions & 49 deletions cpp/src/Ice/PropertyNames.cpp

Large diffs are not rendered by default.

85 changes: 45 additions & 40 deletions cpp/src/Ice/PropertyNames.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) ZeroC, Inc. All rights reserved.

// Generated by makeprops.py from PropertyNames.xml, Tue Jul 2 13:49:12 2024
// Generated by makeprops.py from PropertyNames.xml, Thu Aug 1 10:41:04 2024

// IMPORTANT: Do not edit this file -- any edits made here will be lost!

@@ -12,53 +12,58 @@
namespace IceInternal
{

struct Property
struct Property
{
const char* pattern;
bool usesRegex;
const char* defaultValue;
bool deprecated;

Property(const char* n, bool r, const char* dv, bool d) :
pattern(n),
usesRegex(r),
defaultValue(dv),
deprecated(d)
{
const char* pattern;
bool usesRegex;
const char* defaultValue;
bool deprecated;
}

Property(const char* n, bool r, const char* dv, bool d)
: pattern(n),
usesRegex(r),
defaultValue(dv),
deprecated(d)
{
}
Property() = delete;
};

Property() = delete;
};
struct PropertyArray
{
const Property* properties;
const int length;

struct PropertyArray
PropertyArray(const Property* p, size_t len) :
properties(p),
length(static_cast<int>(len))
{
const Property* properties;
const int length;
}
};

PropertyArray(const Property* p, size_t len) : properties(p), length(static_cast<int>(len)) {}
};
class PropertyNames
{
public:

class PropertyNames
{
public:
static const PropertyArray IceProps;
static const PropertyArray IceMXProps;
static const PropertyArray IceDiscoveryProps;
static const PropertyArray IceLocatorDiscoveryProps;
static const PropertyArray IceBoxProps;
static const PropertyArray IceBoxAdminProps;
static const PropertyArray IceBridgeProps;
static const PropertyArray IceGridAdminProps;
static const PropertyArray IceGridProps;
static const PropertyArray IceSSLProps;
static const PropertyArray IceStormAdminProps;
static const PropertyArray IceBTProps;
static const PropertyArray Glacier2Props;
static const PropertyArray Glacier2CryptPermissionsVerifierProps;
static const PropertyArray IceProps;
static const PropertyArray IceMXProps;
static const PropertyArray IceDiscoveryProps;
static const PropertyArray IceLocatorDiscoveryProps;
static const PropertyArray IceBoxProps;
static const PropertyArray IceBoxAdminProps;
static const PropertyArray IceBridgeProps;
static const PropertyArray IceGridAdminProps;
static const PropertyArray IceGridProps;
static const PropertyArray IceSSLProps;
static const PropertyArray IceStormAdminProps;
static const PropertyArray IceBTProps;
static const PropertyArray Glacier2Props;
static const PropertyArray Glacier2CryptPermissionsVerifierProps;

static const PropertyArray validProps[];
static const char* clPropNames[];
};
static const PropertyArray validProps[];
static const char* clPropNames[];
};

}

35 changes: 29 additions & 6 deletions csharp/src/Ice/ConnectionI.cs
Original file line number Diff line number Diff line change
@@ -969,6 +969,12 @@ public override void message(ThreadPoolCurrent current)
}
}

if (_maxDispatches > 0 && _dispatchCount == _maxDispatches)
{
// Only read from the connection if max dispatches isn't reached.
newOp &= ~SocketOperation.Read;
}

// If the connection is not closed yet, we can update the thread pool selector to wait for
// readiness of read, write or both operations.
if (_state < StateClosed)
@@ -1376,6 +1382,7 @@ internal ConnectionI(
_closeTimeout = options.closeTimeout; // not used for datagram connections
// suppress inactivity timeout for datagram connections
_inactivityTimeout = endpoint.datagram() ? TimeSpan.Zero : options.inactivityTimeout;
_maxDispatches = options.maxDispatches;
_removeFromFactory = removeFromFactory;
_warn = initData.properties.getIcePropertyAsInt("Ice.Warn.Connections") > 0;
_warnUdp = initData.properties.getIcePropertyAsInt("Ice.Warn.Datagrams") > 0;
@@ -1647,31 +1654,40 @@ private void setState(int state)
case StateActive:
{
//
// Can only switch from holding or not validated to
// active.
// Can only switch to active from holding or not validated.
//
if (_state != StateHolding && _state != StateNotValidated)
{
return;
}

if (_maxDispatches > 0 && _dispatchCount == _maxDispatches)
{
// Don't resume reading if maxDispatches is reached.
return;
}

_threadPool.register(this, SocketOperation.Read);
break;
}

case StateHolding:
{
//
// Can only switch from active or not validated to
// holding.
// Can only switch to holding from active or not validated.
//
if (_state != StateActive && _state != StateNotValidated)
{
return;
}
if (_state == StateActive)

if (_maxDispatches > 0 && _dispatchCount == _maxDispatches)
{
_threadPool.unregister(this, SocketOperation.Read);
// Reads are already disabled if maxDispatches is reached.
return;
}

_threadPool.unregister(this, SocketOperation.Read);
break;
}

@@ -2516,6 +2532,12 @@ private void sendResponse(OutgoingResponse response, bool isTwoWay, byte compres
sendMessage(new OutgoingMessage(response.outputStream, compress > 0, adopt: true));
}

if (_maxDispatches > 0 && _state != StateHolding && _dispatchCount == _maxDispatches)
{
// Resume reads for this connection.
_threadPool.update(this, SocketOperation.None, SocketOperation.Read);
}

--_dispatchCount;

if (_state == StateClosing && _upcallCount == 0)
@@ -2896,6 +2918,7 @@ internal void completed(LocalException ex)

// The number of outstanding dispatches. Maintained only while state is StateActive or StateHolding.
private int _dispatchCount;
private readonly int _maxDispatches;

private int _state; // The current state.
private bool _shutdownInitiated;
3 changes: 2 additions & 1 deletion csharp/src/Ice/ConnectionOptions.cs
Original file line number Diff line number Diff line change
@@ -9,4 +9,5 @@ internal sealed record class ConnectionOptions(
TimeSpan closeTimeout,
TimeSpan idleTimeout,
bool enableIdleCheck,
TimeSpan inactivityTimeout);
TimeSpan inactivityTimeout,
int maxDispatches);
13 changes: 8 additions & 5 deletions csharp/src/Ice/Internal/Instance.cs
Original file line number Diff line number Diff line change
@@ -706,11 +706,10 @@ internal void initialize(Ice.Communicator communicator, Ice.InitializationData i
closeTimeout: TimeSpan.FromSeconds(properties.getIcePropertyAsInt("Ice.Connection.CloseTimeout")),
idleTimeout: TimeSpan.FromSeconds(properties.getIcePropertyAsInt("Ice.Connection.IdleTimeout")),
enableIdleCheck: properties.getIcePropertyAsInt("Ice.Connection.EnableIdleCheck") > 0,
inactivityTimeout: TimeSpan.FromSeconds(properties.getIcePropertyAsInt("Ice.Connection.InactivityTimeout")));

inactivityTimeout: TimeSpan.FromSeconds(properties.getIcePropertyAsInt("Ice.Connection.InactivityTimeout")),
maxDispatches: properties.getIcePropertyAsInt("Ice.Connection.MaxDispatches"));
{
int num =
_initData.properties.getIcePropertyAsInt("Ice.MessageSizeMax");
int num = _initData.properties.getIcePropertyAsInt("Ice.MessageSizeMax");
if (num < 1 || num > 0x7fffffff / 1024)
{
_messageSizeMax = 0x7fffffff;
@@ -1436,7 +1435,11 @@ internal ConnectionOptions serverConnectionOptions(string adapterName)

inactivityTimeout: TimeSpan.FromSeconds(properties.getPropertyAsIntWithDefault(
$"{adapterName}.Connection.InactivityTimeout",
(int)clientConnectionOptions.inactivityTimeout.TotalSeconds)));
(int)clientConnectionOptions.inactivityTimeout.TotalSeconds)),

maxDispatches: properties.getPropertyAsIntWithDefault(
$"{adapterName}.Connection.MaxDispatches",
(int)clientConnectionOptions.maxDispatches));
}
else
{
23 changes: 22 additions & 1 deletion csharp/src/Ice/Internal/PropertyNames.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) ZeroC, Inc. All rights reserved.

// Generated by makeprops.py from PropertyNames.xml, Tue Jul 2 13:49:12 2024
// Generated by makeprops.py from PropertyNames.xml, Thu Aug 1 10:41:04 2024

// IMPORTANT: Do not edit this file -- any edits made here will be lost!

@@ -17,6 +17,7 @@ public sealed class PropertyNames
new(@"Ice.Admin.Connection.EnableIdleCheck", false, "1", false),
new(@"Ice.Admin.Connection.IdleTimeout", false, "60", false),
new(@"Ice.Admin.Connection.InactivityTimeout", false, "300", false),
new(@"Ice.Admin.Connection.MaxDispatches", false, "0", false),
new(@"Ice.Admin.Connection", false, "", false),
new(@"Ice.Admin.Endpoints", false, "", false),
new(@"Ice.Admin.Locator.EndpointSelection", false, "", false),
@@ -70,6 +71,7 @@ public sealed class PropertyNames
new(@"Ice.Connection.EnableIdleCheck", false, "1", false),
new(@"Ice.Connection.IdleTimeout", false, "60", false),
new(@"Ice.Connection.InactivityTimeout", false, "300", false),
new(@"Ice.Connection.MaxDispatches", false, "0", false),
new(@"Ice.Connection", false, "", false),
new(@"Ice.ConsoleListener", false, "1", false),
new(@"Ice.Default.CollocationOptimized", false, "1", false),
@@ -200,6 +202,7 @@ public sealed class PropertyNames
new(@"IceDiscovery.Multicast.Connection.EnableIdleCheck", false, "1", false),
new(@"IceDiscovery.Multicast.Connection.IdleTimeout", false, "60", false),
new(@"IceDiscovery.Multicast.Connection.InactivityTimeout", false, "300", false),
new(@"IceDiscovery.Multicast.Connection.MaxDispatches", false, "0", false),
new(@"IceDiscovery.Multicast.Connection", false, "", false),
new(@"IceDiscovery.Multicast.Endpoints", false, "", false),
new(@"IceDiscovery.Multicast.Locator.EndpointSelection", false, "", false),
@@ -239,6 +242,7 @@ public sealed class PropertyNames
new(@"IceDiscovery.Reply.Connection.EnableIdleCheck", false, "1", false),
new(@"IceDiscovery.Reply.Connection.IdleTimeout", false, "60", false),
new(@"IceDiscovery.Reply.Connection.InactivityTimeout", false, "300", false),
new(@"IceDiscovery.Reply.Connection.MaxDispatches", false, "0", false),
new(@"IceDiscovery.Reply.Connection", false, "", false),
new(@"IceDiscovery.Reply.Endpoints", false, "", false),
new(@"IceDiscovery.Reply.Locator.EndpointSelection", false, "", false),
@@ -278,6 +282,7 @@ public sealed class PropertyNames
new(@"IceDiscovery.Locator.Connection.EnableIdleCheck", false, "1", false),
new(@"IceDiscovery.Locator.Connection.IdleTimeout", false, "60", false),
new(@"IceDiscovery.Locator.Connection.InactivityTimeout", false, "300", false),
new(@"IceDiscovery.Locator.Connection.MaxDispatches", false, "0", false),
new(@"IceDiscovery.Locator.Connection", false, "", false),
new(@"IceDiscovery.Locator.Endpoints", false, "", false),
new(@"IceDiscovery.Locator.Locator.EndpointSelection", false, "", false),
@@ -329,6 +334,7 @@ public sealed class PropertyNames
new(@"IceLocatorDiscovery.Reply.Connection.EnableIdleCheck", false, "1", false),
new(@"IceLocatorDiscovery.Reply.Connection.IdleTimeout", false, "60", false),
new(@"IceLocatorDiscovery.Reply.Connection.InactivityTimeout", false, "300", false),
new(@"IceLocatorDiscovery.Reply.Connection.MaxDispatches", false, "0", false),
new(@"IceLocatorDiscovery.Reply.Connection", false, "", false),
new(@"IceLocatorDiscovery.Reply.Endpoints", false, "", false),
new(@"IceLocatorDiscovery.Reply.Locator.EndpointSelection", false, "", false),
@@ -368,6 +374,7 @@ public sealed class PropertyNames
new(@"IceLocatorDiscovery.Locator.Connection.EnableIdleCheck", false, "1", false),
new(@"IceLocatorDiscovery.Locator.Connection.IdleTimeout", false, "60", false),
new(@"IceLocatorDiscovery.Locator.Connection.InactivityTimeout", false, "300", false),
new(@"IceLocatorDiscovery.Locator.Connection.MaxDispatches", false, "0", false),
new(@"IceLocatorDiscovery.Locator.Connection", false, "", false),
new(@"IceLocatorDiscovery.Locator.Endpoints", false, "", false),
new(@"IceLocatorDiscovery.Locator.Locator.EndpointSelection", false, "", false),
@@ -455,6 +462,7 @@ public sealed class PropertyNames
new(@"IceBridge.Source.Connection.EnableIdleCheck", false, "1", false),
new(@"IceBridge.Source.Connection.IdleTimeout", false, "60", false),
new(@"IceBridge.Source.Connection.InactivityTimeout", false, "300", false),
new(@"IceBridge.Source.Connection.MaxDispatches", false, "0", false),
new(@"IceBridge.Source.Connection", false, "", false),
new(@"IceBridge.Source.Endpoints", false, "", false),
new(@"IceBridge.Source.Locator.EndpointSelection", false, "", false),
@@ -508,6 +516,7 @@ public sealed class PropertyNames
new(@"IceGridAdmin.Server.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGridAdmin.Server.Connection.IdleTimeout", false, "60", false),
new(@"IceGridAdmin.Server.Connection.InactivityTimeout", false, "300", false),
new(@"IceGridAdmin.Server.Connection.MaxDispatches", false, "0", false),
new(@"IceGridAdmin.Server.Connection", false, "", false),
new(@"IceGridAdmin.Server.Endpoints", false, "", false),
new(@"IceGridAdmin.Server.Locator.EndpointSelection", false, "", false),
@@ -550,6 +559,7 @@ public sealed class PropertyNames
new(@"IceGridAdmin.Discovery.Reply.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGridAdmin.Discovery.Reply.Connection.IdleTimeout", false, "60", false),
new(@"IceGridAdmin.Discovery.Reply.Connection.InactivityTimeout", false, "300", false),
new(@"IceGridAdmin.Discovery.Reply.Connection.MaxDispatches", false, "0", false),
new(@"IceGridAdmin.Discovery.Reply.Connection", false, "", false),
new(@"IceGridAdmin.Discovery.Reply.Endpoints", false, "", false),
new(@"IceGridAdmin.Discovery.Reply.Locator.EndpointSelection", false, "", false),
@@ -589,6 +599,7 @@ public sealed class PropertyNames
new(@"IceGridAdmin.Discovery.Locator.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGridAdmin.Discovery.Locator.Connection.IdleTimeout", false, "60", false),
new(@"IceGridAdmin.Discovery.Locator.Connection.InactivityTimeout", false, "300", false),
new(@"IceGridAdmin.Discovery.Locator.Connection.MaxDispatches", false, "0", false),
new(@"IceGridAdmin.Discovery.Locator.Connection", false, "", false),
new(@"IceGridAdmin.Discovery.Locator.Endpoints", false, "", false),
new(@"IceGridAdmin.Discovery.Locator.Locator.EndpointSelection", false, "", false),
@@ -634,6 +645,7 @@ public sealed class PropertyNames
new(@"IceGrid.AdminRouter.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.AdminRouter.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.AdminRouter.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.AdminRouter.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.AdminRouter.Connection", false, "", false),
new(@"IceGrid.AdminRouter.Endpoints", false, "", false),
new(@"IceGrid.AdminRouter.Locator.EndpointSelection", false, "", false),
@@ -674,6 +686,7 @@ public sealed class PropertyNames
new(@"IceGrid.Node.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.Node.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.Node.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.Node.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.Node.Connection", false, "", false),
new(@"IceGrid.Node.Endpoints", false, "", false),
new(@"IceGrid.Node.Locator.EndpointSelection", false, "", false),
@@ -754,6 +767,7 @@ public sealed class PropertyNames
new(@"IceGrid.Registry.AdminSessionManager.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.Registry.AdminSessionManager.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.Registry.AdminSessionManager.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.Registry.AdminSessionManager.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.Registry.AdminSessionManager.Connection", false, "", false),
new(@"IceGrid.Registry.AdminSessionManager.Endpoints", false, "", false),
new(@"IceGrid.Registry.AdminSessionManager.Locator.EndpointSelection", false, "", false),
@@ -803,6 +817,7 @@ public sealed class PropertyNames
new(@"IceGrid.Registry.Client.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.Registry.Client.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.Registry.Client.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.Registry.Client.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.Registry.Client.Connection", false, "", false),
new(@"IceGrid.Registry.Client.Endpoints", false, "", false),
new(@"IceGrid.Registry.Client.Locator.EndpointSelection", false, "", false),
@@ -844,6 +859,7 @@ public sealed class PropertyNames
new(@"IceGrid.Registry.Discovery.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.Registry.Discovery.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.Registry.Discovery.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.Registry.Discovery.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.Registry.Discovery.Connection", false, "", false),
new(@"IceGrid.Registry.Discovery.Endpoints", false, "", false),
new(@"IceGrid.Registry.Discovery.Locator.EndpointSelection", false, "", false),
@@ -888,6 +904,7 @@ public sealed class PropertyNames
new(@"IceGrid.Registry.Internal.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.Registry.Internal.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.Registry.Internal.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.Registry.Internal.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.Registry.Internal.Connection", false, "", false),
new(@"IceGrid.Registry.Internal.Endpoints", false, "", false),
new(@"IceGrid.Registry.Internal.Locator.EndpointSelection", false, "", false),
@@ -940,6 +957,7 @@ public sealed class PropertyNames
new(@"IceGrid.Registry.Server.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.Registry.Server.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.Registry.Server.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.Registry.Server.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.Registry.Server.Connection", false, "", false),
new(@"IceGrid.Registry.Server.Endpoints", false, "", false),
new(@"IceGrid.Registry.Server.Locator.EndpointSelection", false, "", false),
@@ -980,6 +998,7 @@ public sealed class PropertyNames
new(@"IceGrid.Registry.SessionManager.Connection.EnableIdleCheck", false, "1", false),
new(@"IceGrid.Registry.SessionManager.Connection.IdleTimeout", false, "60", false),
new(@"IceGrid.Registry.SessionManager.Connection.InactivityTimeout", false, "300", false),
new(@"IceGrid.Registry.SessionManager.Connection.MaxDispatches", false, "0", false),
new(@"IceGrid.Registry.SessionManager.Connection", false, "", false),
new(@"IceGrid.Registry.SessionManager.Endpoints", false, "", false),
new(@"IceGrid.Registry.SessionManager.Locator.EndpointSelection", false, "", false),
@@ -1095,6 +1114,7 @@ public sealed class PropertyNames
new(@"Glacier2.Client.Connection.EnableIdleCheck", false, "1", false),
new(@"Glacier2.Client.Connection.IdleTimeout", false, "60", false),
new(@"Glacier2.Client.Connection.InactivityTimeout", false, "300", false),
new(@"Glacier2.Client.Connection.MaxDispatches", false, "0", false),
new(@"Glacier2.Client.Connection", false, "", false),
new(@"Glacier2.Client.Endpoints", false, "", false),
new(@"Glacier2.Client.Locator.EndpointSelection", false, "", false),
@@ -1171,6 +1191,7 @@ public sealed class PropertyNames
new(@"Glacier2.Server.Connection.EnableIdleCheck", false, "1", false),
new(@"Glacier2.Server.Connection.IdleTimeout", false, "60", false),
new(@"Glacier2.Server.Connection.InactivityTimeout", false, "300", false),
new(@"Glacier2.Server.Connection.MaxDispatches", false, "0", false),
new(@"Glacier2.Server.Connection", false, "", false),
new(@"Glacier2.Server.Endpoints", false, "", false),
new(@"Glacier2.Server.Locator.EndpointSelection", false, "", false),
1 change: 1 addition & 0 deletions csharp/src/Ice/ObjectAdapter.cs
Original file line number Diff line number Diff line change
@@ -1646,6 +1646,7 @@ private Object createDispatchPipeline()
"Connection.EnableIdleCheck",
"Connection.IdleTimeout",
"Connection.InactivityTimeout",
"Connection.MaxDispatches",
"Endpoints",
"Locator",
"Locator.EncodingVersion",
19 changes: 19 additions & 0 deletions csharp/test/Ice/idleTimeout/AllTests.cs
Original file line number Diff line number Diff line change
@@ -14,10 +14,14 @@ internal static async Task allTests(global::Test.TestHelper helper)

string proxyString3s = $"test: {helper.getTestEndpoint(1)}";

string proxyStringMaxDispatches = $"test: {helper.getTestEndpoint(2)}";
Test.TestIntfPrx pMaxDispatches = Test.TestIntfPrxHelper.createProxy(communicator, proxyStringMaxDispatches);

await testIdleCheckDoesNotAbortConnectionWhenThreadPoolIsExhausted(p, helper.getWriter());
await testConnectionAbortedByIdleCheck(proxyString, communicator.getProperties(), helper.getWriter());
await testEnableDisableIdleCheck(true, proxyString3s, communicator.getProperties(), helper.getWriter());
await testEnableDisableIdleCheck(false, proxyString3s, communicator.getProperties(), helper.getWriter());
await testMaxDispatches(pMaxDispatches, helper.getWriter());

await p.shutdownAsync();
}
@@ -115,4 +119,19 @@ private static async Task testEnableDisableIdleCheck(
}
output.WriteLine("ok");
}

private static async Task testMaxDispatches(Test.TestIntfPrx p, TextWriter output)
{
output.Write("testing max dispatches... ");
output.Flush();

var sleepTask = p.sleepAsync(2000);
var sleepTask2 = p.sleepAsync(1000);
await Task.Delay(1500);
test(sleepTask2.IsCompleted == false);
await sleepTask;
await sleepTask2;

output.WriteLine("ok");
}
}
7 changes: 7 additions & 0 deletions csharp/test/Ice/idleTimeout/Server.cs
Original file line number Diff line number Diff line change
@@ -24,6 +24,13 @@ public override void run(string[] args)
adapter3s.add(new TestIntfI(), Ice.Util.stringToIdentity("test"));
adapter3s.activate();

communicator.getProperties().setProperty("TestAdapterMaxDispatches.Endpoints", getTestEndpoint(2));
communicator.getProperties().setProperty("TestAdapterMaxDispatches.ThreadPool.Size", "10");
communicator.getProperties().setProperty("TestAdapterMaxDispatches.Connection.MaxDispatches", "1");
var adapterMaxDispatches = communicator.createObjectAdapter("TestAdapterMaxDispatches");
adapterMaxDispatches.add(new TestIntfI(), Ice.Util.stringToIdentity("test"));
adapterMaxDispatches.activate();

serverReady();
communicator.waitForShutdown();
}
2,574 changes: 1,291 additions & 1,283 deletions java/src/Ice/src/main/java/com/zeroc/IceInternal/PropertyNames.java

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions js/src/Ice/PropertyNames.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) ZeroC, Inc. All rights reserved.

// Generated by makeprops.py from PropertyNames.xml, Tue Jul 2 13:49:12 2024
// Generated by makeprops.py from PropertyNames.xml, Thu Aug 1 10:41:04 2024

// IMPORTANT: Do not edit this file -- any edits made here will be lost!

@@ -10,14 +10,16 @@

import { Property } from "./Property.js";
export const PropertyNames = {};
const IceProps = [
const IceProps =
[
new Property("Ice.AcceptClassCycles", false, "0", false),
new Property("Ice.Admin.AdapterId", false, "", false),
new Property("Ice.Admin.Connection.CloseTimeout", false, "10", false),
new Property("Ice.Admin.Connection.ConnectTimeout", false, "10", false),
new Property("Ice.Admin.Connection.EnableIdleCheck", false, "1", false),
new Property("Ice.Admin.Connection.IdleTimeout", false, "60", false),
new Property("Ice.Admin.Connection.InactivityTimeout", false, "300", false),
new Property("Ice.Admin.Connection.MaxDispatches", false, "0", false),
new Property("Ice.Admin.Connection", false, "", false),
new Property("Ice.Admin.Endpoints", false, "", false),
new Property("Ice.Admin.Locator.EndpointSelection", false, "", false),
@@ -71,6 +73,7 @@ const IceProps = [
new Property("Ice.Connection.EnableIdleCheck", false, "1", false),
new Property("Ice.Connection.IdleTimeout", false, "60", false),
new Property("Ice.Connection.InactivityTimeout", false, "300", false),
new Property("Ice.Connection.MaxDispatches", false, "0", false),
new Property("Ice.Connection", false, "", false),
new Property("Ice.ConsoleListener", false, "1", false),
new Property("Ice.Default.CollocationOptimized", false, "1", false),

0 comments on commit 6aadb09

Please sign in to comment.