zeroc-ice 3.7.11 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (895) hide show
  1. checksums.yaml +4 -4
  2. data/dist/IceRuby/Communicator.cpp +159 -376
  3. data/dist/IceRuby/Communicator.h +8 -9
  4. data/dist/IceRuby/Config.h +23 -89
  5. data/dist/IceRuby/Connection.cpp +111 -219
  6. data/dist/IceRuby/Connection.h +8 -12
  7. data/dist/IceRuby/DefaultSliceLoader.cpp +45 -0
  8. data/dist/IceRuby/DefaultSliceLoader.h +25 -0
  9. data/dist/IceRuby/Endpoint.cpp +63 -65
  10. data/dist/IceRuby/Endpoint.h +7 -11
  11. data/dist/IceRuby/ImplicitContext.cpp +26 -31
  12. data/dist/IceRuby/ImplicitContext.h +6 -10
  13. data/dist/IceRuby/Init.cpp +27 -40
  14. data/dist/IceRuby/Logger.cpp +23 -28
  15. data/dist/IceRuby/Logger.h +8 -12
  16. data/dist/IceRuby/Operation.cpp +177 -219
  17. data/dist/IceRuby/Operation.h +15 -18
  18. data/dist/IceRuby/Properties.cpp +133 -89
  19. data/dist/IceRuby/Properties.h +6 -10
  20. data/dist/IceRuby/Proxy.cpp +179 -649
  21. data/dist/IceRuby/Proxy.h +11 -12
  22. data/dist/IceRuby/RubySliceLoader.cpp +39 -0
  23. data/dist/IceRuby/RubySliceLoader.h +27 -0
  24. data/dist/IceRuby/Slice.cpp +88 -94
  25. data/dist/IceRuby/Slice.h +3 -7
  26. data/dist/IceRuby/Types.cpp +987 -1190
  27. data/dist/IceRuby/Types.h +390 -461
  28. data/dist/IceRuby/Util.cpp +214 -473
  29. data/dist/IceRuby/Util.h +378 -479
  30. data/dist/ice/cpp/include/Ice/AsyncResponseHandler.h +85 -0
  31. data/dist/ice/cpp/include/Ice/BatchRequest.h +39 -0
  32. data/dist/ice/cpp/include/Ice/BatchRequestQueueF.h +4 -10
  33. data/dist/ice/cpp/include/Ice/Buffer.h +116 -111
  34. data/dist/ice/cpp/include/Ice/Communicator.h +411 -0
  35. data/dist/ice/cpp/include/Ice/CommunicatorF.h +16 -0
  36. data/dist/ice/cpp/include/Ice/Config.h +46 -62
  37. data/dist/ice/cpp/include/Ice/Connection.h +410 -0
  38. data/dist/ice/cpp/include/Ice/ConnectionF.h +36 -0
  39. data/dist/ice/cpp/include/Ice/ConnectionIF.h +6 -28
  40. data/dist/ice/cpp/include/Ice/CtrlCHandler.h +56 -0
  41. data/dist/ice/cpp/include/Ice/Current.h +60 -0
  42. data/dist/ice/cpp/include/Ice/DefaultSliceLoader.h +160 -0
  43. data/dist/ice/cpp/include/Ice/Demangle.h +17 -0
  44. data/dist/ice/cpp/include/Ice/Endpoint.h +298 -0
  45. data/dist/ice/cpp/include/Ice/EndpointF.h +44 -0
  46. data/dist/ice/cpp/include/Ice/EndpointSelectionType.h +21 -0
  47. data/dist/ice/cpp/include/Ice/Exception.h +46 -151
  48. data/dist/ice/cpp/include/Ice/FacetMap.h +16 -0
  49. data/dist/ice/cpp/include/Ice/Format.h +11 -27
  50. data/dist/ice/cpp/include/Ice/Ice.h +53 -48
  51. data/dist/ice/cpp/include/Ice/IconvStringConverter.h +165 -326
  52. data/dist/ice/cpp/include/Ice/ImplicitContext.h +76 -0
  53. data/dist/ice/cpp/include/Ice/IncomingRequest.h +75 -0
  54. data/dist/ice/cpp/include/Ice/Initialize.h +113 -927
  55. data/dist/ice/cpp/include/Ice/InputStream.h +748 -1320
  56. data/dist/ice/cpp/include/Ice/InstanceF.h +4 -10
  57. data/dist/ice/cpp/include/Ice/Instrumentation.h +319 -0
  58. data/dist/ice/cpp/include/Ice/LocalException.h +58 -0
  59. data/dist/ice/cpp/include/Ice/LocalExceptions.h +870 -0
  60. data/dist/ice/cpp/include/Ice/Logger.h +62 -0
  61. data/dist/ice/cpp/include/Ice/LoggerUtil.h +124 -147
  62. data/dist/ice/cpp/include/Ice/MarshaledResult.h +50 -0
  63. data/dist/ice/cpp/include/Ice/NativePropertiesAdmin.h +41 -71
  64. data/dist/ice/cpp/include/Ice/Object.h +151 -490
  65. data/dist/ice/cpp/include/Ice/ObjectAdapter.h +324 -0
  66. data/dist/ice/cpp/include/Ice/ObjectAdapterF.h +16 -0
  67. data/dist/ice/cpp/include/Ice/ObjectF.h +5 -19
  68. data/dist/ice/cpp/include/Ice/ObserverHelper.h +115 -132
  69. data/dist/ice/cpp/include/Ice/OutgoingAsync.h +392 -748
  70. data/dist/ice/cpp/include/Ice/OutgoingResponse.h +129 -0
  71. data/dist/ice/cpp/include/Ice/OutputStream.h +756 -956
  72. data/dist/ice/cpp/include/Ice/Plugin.h +73 -0
  73. data/dist/ice/cpp/include/Ice/PluginFactory.h +77 -0
  74. data/dist/ice/cpp/include/{IceUtil → Ice}/PopDisableWarnings.h +8 -6
  75. data/dist/ice/cpp/include/Ice/Properties.h +307 -0
  76. data/dist/ice/cpp/include/Ice/PropertiesF.h +19 -0
  77. data/dist/ice/cpp/include/Ice/Proxy.h +665 -5094
  78. data/dist/ice/cpp/include/Ice/ProxyF.h +2 -44
  79. data/dist/ice/cpp/include/Ice/ProxyFunctions.h +209 -0
  80. data/dist/ice/cpp/include/Ice/PushDisableWarnings.h +29 -0
  81. data/dist/ice/cpp/include/Ice/ReferenceF.h +4 -19
  82. data/dist/ice/cpp/include/Ice/RequestHandlerF.h +8 -18
  83. data/dist/ice/cpp/include/Ice/SSL/ClientAuthenticationOptions.h +276 -0
  84. data/dist/ice/cpp/include/Ice/SSL/Config.h +54 -0
  85. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfo.h +107 -0
  86. data/dist/ice/cpp/include/Ice/SSL/ConnectionInfoF.h +39 -0
  87. data/dist/ice/cpp/include/Ice/SSL/EndpointInfo.h +40 -0
  88. data/dist/ice/cpp/include/Ice/SSL/SSLException.h +32 -0
  89. data/dist/ice/cpp/include/Ice/SSL/ServerAuthenticationOptions.h +286 -0
  90. data/dist/ice/cpp/include/Ice/ServantLocator.h +51 -0
  91. data/dist/ice/cpp/include/Ice/Service.h +182 -342
  92. data/dist/ice/cpp/include/Ice/SliceLoader.h +67 -0
  93. data/dist/ice/cpp/include/Ice/SlicedData.h +113 -160
  94. data/dist/ice/cpp/include/Ice/SlicedDataF.h +17 -27
  95. data/dist/ice/cpp/include/Ice/StreamHelpers.h +532 -1070
  96. data/dist/ice/cpp/include/Ice/StreamableTraits.h +291 -0
  97. data/dist/ice/cpp/include/Ice/StringConverter.h +152 -63
  98. data/dist/ice/cpp/include/Ice/StringUtil.h +114 -0
  99. data/dist/ice/cpp/include/Ice/TimerTask.h +24 -0
  100. data/dist/ice/cpp/include/Ice/TupleCompare.h +103 -0
  101. data/dist/ice/cpp/include/Ice/UUID.h +6 -9
  102. data/dist/ice/cpp/include/Ice/UserException.h +46 -0
  103. data/dist/ice/cpp/include/Ice/UserExceptionFactory.h +4 -79
  104. data/dist/ice/cpp/include/Ice/Value.h +103 -115
  105. data/dist/ice/cpp/include/Ice/ValueF.h +6 -11
  106. data/dist/ice/cpp/include/IceDiscovery/IceDiscovery.h +16 -1877
  107. data/dist/ice/cpp/include/IceLocatorDiscovery/IceLocatorDiscovery.h +16 -1185
  108. data/dist/ice/cpp/include/generated/Ice/BuiltinSequences.h +46 -146
  109. data/dist/ice/cpp/include/generated/Ice/Context.h +40 -0
  110. data/dist/ice/cpp/include/generated/Ice/EndpointTypes.h +49 -93
  111. data/dist/ice/cpp/include/generated/Ice/Identity.h +70 -226
  112. data/dist/ice/cpp/include/generated/Ice/Locator.h +494 -3850
  113. data/dist/ice/cpp/include/generated/Ice/LocatorRegistry.h +443 -0
  114. data/dist/ice/cpp/include/generated/Ice/Metrics.h +937 -4603
  115. data/dist/ice/cpp/include/generated/Ice/OperationMode.h +73 -0
  116. data/dist/ice/cpp/include/generated/Ice/Process.h +197 -929
  117. data/dist/ice/cpp/include/generated/Ice/PropertiesAdmin.h +249 -1301
  118. data/dist/ice/cpp/include/generated/Ice/PropertyDict.h +39 -0
  119. data/dist/ice/cpp/include/generated/Ice/RemoteLogger.h +637 -2620
  120. data/dist/ice/cpp/include/generated/Ice/ReplyStatus.h +94 -0
  121. data/dist/ice/cpp/include/generated/Ice/Router.h +429 -1783
  122. data/dist/ice/cpp/include/generated/Ice/SliceChecksumDict.h +18 -65
  123. data/dist/ice/cpp/include/generated/Ice/Version.h +73 -318
  124. data/dist/ice/cpp/include/generated/IceDiscovery/Lookup.h +498 -0
  125. data/dist/ice/cpp/include/generated/IceLocatorDiscovery/Lookup.h +387 -0
  126. data/dist/ice/cpp/src/Ice/Acceptor.h +28 -24
  127. data/dist/ice/cpp/src/Ice/AcceptorF.h +6 -14
  128. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories.h +16 -0
  129. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_all.cpp +43 -0
  130. data/dist/ice/cpp/src/Ice/AddDefaultPluginFactories_min.cpp +17 -0
  131. data/dist/ice/cpp/src/Ice/ArgVector.cpp +17 -18
  132. data/dist/ice/cpp/src/Ice/ArgVector.h +19 -25
  133. data/dist/ice/cpp/src/Ice/Base64.cpp +66 -66
  134. data/dist/ice/cpp/src/Ice/Base64.h +14 -19
  135. data/dist/ice/cpp/src/Ice/BatchRequestQueue.cpp +70 -121
  136. data/dist/ice/cpp/src/Ice/BatchRequestQueue.h +37 -47
  137. data/dist/ice/cpp/src/Ice/Buffer.cpp +73 -41
  138. data/dist/ice/cpp/src/Ice/CheckIdentity.h +21 -0
  139. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.cpp +215 -249
  140. data/dist/ice/cpp/src/Ice/CollocatedRequestHandler.h +38 -60
  141. data/dist/ice/cpp/src/Ice/Communicator.cpp +399 -0
  142. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.cpp +140 -0
  143. data/dist/ice/cpp/src/Ice/CommunicatorFlushBatchAsync.h +39 -0
  144. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.cpp +63 -184
  145. data/dist/ice/cpp/src/Ice/ConnectRequestHandler.h +30 -51
  146. data/dist/ice/cpp/src/Ice/ConnectRequestHandlerF.h +4 -14
  147. data/dist/ice/cpp/src/Ice/Connection.cpp +44 -0
  148. data/dist/ice/cpp/src/Ice/ConnectionFactory.cpp +578 -792
  149. data/dist/ice/cpp/src/Ice/ConnectionFactory.h +200 -200
  150. data/dist/ice/cpp/src/Ice/ConnectionFactoryF.h +6 -19
  151. data/dist/ice/cpp/src/Ice/ConnectionI.cpp +1674 -1782
  152. data/dist/ice/cpp/src/Ice/ConnectionI.h +333 -293
  153. data/dist/ice/cpp/src/Ice/ConnectionOptions.h +22 -0
  154. data/dist/ice/cpp/src/Ice/Connector.h +25 -19
  155. data/dist/ice/cpp/src/Ice/ConnectorF.h +4 -11
  156. data/dist/ice/cpp/src/{IceUtil → Ice}/ConsoleUtil.cpp +32 -53
  157. data/dist/ice/cpp/src/Ice/ConsoleUtil.h +79 -0
  158. data/dist/ice/cpp/src/Ice/CtrlCHandler.cpp +189 -0
  159. data/dist/ice/cpp/src/Ice/Current.cpp +29 -0
  160. data/dist/ice/cpp/src/Ice/DLLMain.cpp +25 -35
  161. data/dist/ice/cpp/src/Ice/DefaultSliceLoader.cpp +39 -0
  162. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.cpp +41 -119
  163. data/dist/ice/cpp/src/Ice/DefaultsAndOverrides.h +27 -41
  164. data/dist/ice/cpp/src/Ice/DefaultsAndOverridesF.h +4 -11
  165. data/dist/ice/cpp/src/Ice/Demangle.cpp +26 -0
  166. data/dist/ice/cpp/src/Ice/DisableWarnings.h +31 -0
  167. data/dist/ice/cpp/src/Ice/DynamicLibrary.cpp +44 -112
  168. data/dist/ice/cpp/src/Ice/DynamicLibrary.h +91 -0
  169. data/dist/ice/cpp/src/Ice/Endian.h +40 -0
  170. data/dist/ice/cpp/src/Ice/EndpointFactory.cpp +35 -59
  171. data/dist/ice/cpp/src/Ice/EndpointFactory.h +82 -103
  172. data/dist/ice/cpp/src/Ice/EndpointFactoryF.h +4 -11
  173. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.cpp +54 -87
  174. data/dist/ice/cpp/src/Ice/EndpointFactoryManager.h +28 -33
  175. data/dist/ice/cpp/src/Ice/EndpointFactoryManagerF.h +4 -11
  176. data/dist/ice/cpp/src/Ice/EndpointI.cpp +53 -23
  177. data/dist/ice/cpp/src/Ice/EndpointI.h +132 -200
  178. data/dist/ice/cpp/src/Ice/EndpointIF.h +11 -39
  179. data/dist/ice/cpp/src/Ice/EventHandler.cpp +3 -26
  180. data/dist/ice/cpp/src/Ice/EventHandler.h +46 -56
  181. data/dist/ice/cpp/src/Ice/EventHandlerF.h +4 -14
  182. data/dist/ice/cpp/src/Ice/Exception.cpp +3 -816
  183. data/dist/ice/cpp/src/Ice/FileUtil.cpp +476 -0
  184. data/dist/ice/cpp/src/Ice/FileUtil.h +152 -0
  185. data/dist/ice/cpp/src/Ice/FixedRequestHandler.cpp +34 -0
  186. data/dist/ice/cpp/src/Ice/FixedRequestHandler.h +29 -0
  187. data/dist/ice/cpp/src/Ice/HashUtil.h +46 -32
  188. data/dist/ice/cpp/src/Ice/HttpParser.cpp +431 -431
  189. data/dist/ice/cpp/src/Ice/HttpParser.h +95 -100
  190. data/dist/ice/cpp/src/Ice/IPEndpointI.cpp +207 -324
  191. data/dist/ice/cpp/src/Ice/IPEndpointI.h +80 -126
  192. data/dist/ice/cpp/src/Ice/IPEndpointIF.h +6 -17
  193. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +172 -0
  194. data/dist/ice/cpp/src/Ice/IdleTimeoutTransceiverDecorator.h +89 -0
  195. data/dist/ice/cpp/src/Ice/ImplicitContext.cpp +109 -0
  196. data/dist/ice/cpp/src/Ice/IncomingRequest.cpp +66 -0
  197. data/dist/ice/cpp/src/Ice/Initialize.cpp +48 -542
  198. data/dist/ice/cpp/src/Ice/InputStream.cpp +848 -1385
  199. data/dist/ice/cpp/src/Ice/Instance.cpp +816 -827
  200. data/dist/ice/cpp/src/Ice/Instance.h +202 -212
  201. data/dist/ice/cpp/src/Ice/InstrumentationI.cpp +526 -661
  202. data/dist/ice/cpp/src/Ice/InstrumentationI.h +171 -192
  203. data/dist/ice/cpp/src/Ice/LocalException.cpp +518 -0
  204. data/dist/ice/cpp/src/Ice/LocalExceptions.cpp +577 -0
  205. data/dist/ice/cpp/src/Ice/LocatorInfo.cpp +291 -329
  206. data/dist/ice/cpp/src/Ice/LocatorInfo.h +144 -157
  207. data/dist/ice/cpp/src/Ice/LocatorInfoF.h +8 -17
  208. data/dist/ice/cpp/src/Ice/LoggerAdminI.cpp +561 -743
  209. data/dist/ice/cpp/src/Ice/LoggerAdminI.h +18 -28
  210. data/dist/ice/cpp/src/Ice/LoggerI.cpp +66 -91
  211. data/dist/ice/cpp/src/Ice/LoggerI.h +36 -41
  212. data/dist/ice/cpp/src/Ice/LoggerMiddleware.cpp +176 -0
  213. data/dist/ice/cpp/src/Ice/LoggerMiddleware.h +42 -0
  214. data/dist/ice/cpp/src/Ice/LoggerUtil.cpp +14 -38
  215. data/dist/ice/cpp/src/Ice/MarshaledResult.cpp +20 -0
  216. data/dist/ice/cpp/src/Ice/MetricsAdminI.cpp +194 -280
  217. data/dist/ice/cpp/src/Ice/MetricsAdminI.h +600 -0
  218. data/dist/ice/cpp/src/Ice/MetricsFunctional.h +92 -0
  219. data/dist/ice/cpp/src/Ice/MetricsObserverI.h +587 -0
  220. data/dist/ice/cpp/src/Ice/NativePropertiesAdmin.cpp +185 -0
  221. data/dist/ice/cpp/src/Ice/Network.cpp +595 -917
  222. data/dist/ice/cpp/src/Ice/Network.h +189 -213
  223. data/dist/ice/cpp/src/Ice/NetworkF.h +2 -10
  224. data/dist/ice/cpp/src/Ice/NetworkProxy.cpp +99 -104
  225. data/dist/ice/cpp/src/Ice/NetworkProxy.h +49 -54
  226. data/dist/ice/cpp/src/Ice/NetworkProxyF.h +4 -11
  227. data/dist/ice/cpp/src/Ice/OSLogLoggerI.cpp +16 -18
  228. data/dist/ice/cpp/src/Ice/OSLogLoggerI.h +22 -27
  229. data/dist/ice/cpp/src/Ice/Object.cpp +152 -338
  230. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.cpp +170 -113
  231. data/dist/ice/cpp/src/Ice/ObjectAdapterFactory.h +41 -41
  232. data/dist/ice/cpp/src/Ice/ObjectAdapterFactoryF.h +4 -15
  233. data/dist/ice/cpp/src/Ice/ObjectAdapterI.cpp +580 -727
  234. data/dist/ice/cpp/src/Ice/ObjectAdapterI.h +149 -145
  235. data/dist/ice/cpp/src/Ice/ObserverHelper.cpp +36 -17
  236. data/dist/ice/cpp/src/Ice/ObserverMiddleware.cpp +96 -0
  237. data/dist/ice/cpp/src/Ice/ObserverMiddleware.h +25 -0
  238. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.cpp +147 -187
  239. data/dist/ice/cpp/src/Ice/OpaqueEndpointI.h +56 -64
  240. data/dist/ice/cpp/src/{IceUtil → Ice}/Options.cpp +187 -258
  241. data/dist/ice/cpp/src/Ice/Options.h +119 -0
  242. data/dist/ice/cpp/src/Ice/OutgoingAsync.cpp +516 -732
  243. data/dist/ice/cpp/src/Ice/OutgoingResponse.cpp +276 -0
  244. data/dist/ice/cpp/src/Ice/OutputStream.cpp +610 -543
  245. data/dist/ice/cpp/src/Ice/OutputUtil.cpp +344 -0
  246. data/dist/ice/cpp/src/Ice/OutputUtil.h +173 -0
  247. data/dist/ice/cpp/src/Ice/PluginManagerI.cpp +118 -277
  248. data/dist/ice/cpp/src/Ice/PluginManagerI.h +41 -48
  249. data/dist/ice/cpp/src/Ice/Properties.cpp +931 -0
  250. data/dist/ice/cpp/src/Ice/PropertyNames.cpp +519 -1341
  251. data/dist/ice/cpp/src/Ice/PropertyNames.h +49 -64
  252. data/dist/ice/cpp/src/Ice/PropertyUtil.cpp +103 -0
  253. data/dist/ice/cpp/src/Ice/PropertyUtil.h +31 -0
  254. data/dist/ice/cpp/src/Ice/Protocol.cpp +129 -94
  255. data/dist/ice/cpp/src/Ice/Protocol.h +116 -0
  256. data/dist/ice/cpp/src/Ice/ProtocolInstance.cpp +117 -62
  257. data/dist/ice/cpp/src/Ice/ProtocolInstance.h +63 -82
  258. data/dist/ice/cpp/src/Ice/ProtocolInstanceF.h +4 -11
  259. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.cpp +10 -32
  260. data/dist/ice/cpp/src/Ice/ProtocolPluginFacade.h +25 -54
  261. data/dist/ice/cpp/src/Ice/Proxy.cpp +294 -1357
  262. data/dist/ice/cpp/src/Ice/ProxyAsync.cpp +684 -0
  263. data/dist/ice/cpp/src/Ice/ProxyFunctions.cpp +90 -0
  264. data/dist/ice/cpp/src/Ice/PushDisableDeprecatedWarnings.h +15 -0
  265. data/dist/ice/cpp/src/Ice/Random.cpp +29 -0
  266. data/dist/ice/cpp/src/Ice/Random.h +23 -0
  267. data/dist/ice/cpp/src/Ice/Reference.cpp +635 -1097
  268. data/dist/ice/cpp/src/Ice/Reference.h +314 -298
  269. data/dist/ice/cpp/src/Ice/ReferenceFactory.cpp +320 -378
  270. data/dist/ice/cpp/src/Ice/ReferenceFactory.h +48 -66
  271. data/dist/ice/cpp/src/Ice/ReferenceFactoryF.h +4 -9
  272. data/dist/ice/cpp/src/Ice/RequestHandler.cpp +15 -24
  273. data/dist/ice/cpp/src/Ice/RequestHandler.h +43 -68
  274. data/dist/ice/cpp/src/Ice/RequestHandlerCache.cpp +76 -0
  275. data/dist/ice/cpp/src/Ice/RequestHandlerCache.h +33 -0
  276. data/dist/ice/cpp/src/Ice/ResourceConfig.h +27 -0
  277. data/dist/ice/cpp/src/Ice/RetryQueue.cpp +51 -57
  278. data/dist/ice/cpp/src/Ice/RetryQueue.h +39 -46
  279. data/dist/ice/cpp/src/Ice/RetryQueueF.h +4 -9
  280. data/dist/ice/cpp/src/Ice/RouterInfo.cpp +97 -201
  281. data/dist/ice/cpp/src/Ice/RouterInfo.h +61 -118
  282. data/dist/ice/cpp/src/Ice/RouterInfoF.h +6 -14
  283. data/dist/ice/cpp/src/Ice/SHA1.cpp +86 -60
  284. data/dist/ice/cpp/src/Ice/SHA1.h +35 -0
  285. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.cpp +89 -0
  286. data/dist/ice/cpp/src/Ice/SSL/DistinguishedName.h +87 -0
  287. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.cpp +521 -0
  288. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngine.h +40 -0
  289. data/dist/ice/cpp/src/Ice/SSL/OpenSSLEngineF.h +13 -0
  290. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.cpp +646 -0
  291. data/dist/ice/cpp/src/Ice/SSL/OpenSSLTransceiverI.h +80 -0
  292. data/dist/ice/cpp/src/{IceSSL → Ice/SSL}/RFC2253.cpp +85 -88
  293. data/dist/ice/cpp/src/Ice/SSL/RFC2253.h +58 -0
  294. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.cpp +124 -0
  295. data/dist/ice/cpp/src/Ice/SSL/SSLAcceptorI.h +52 -0
  296. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.cpp +92 -0
  297. data/dist/ice/cpp/src/Ice/SSL/SSLConnectorI.h +38 -0
  298. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.cpp +377 -0
  299. data/dist/ice/cpp/src/Ice/SSL/SSLEndpointI.h +84 -0
  300. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.cpp +115 -0
  301. data/dist/ice/cpp/src/Ice/SSL/SSLEngine.h +69 -0
  302. data/dist/ice/cpp/src/Ice/SSL/SSLEngineF.h +14 -0
  303. data/dist/ice/cpp/src/Ice/SSL/SSLException.cpp +18 -0
  304. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.cpp +27 -0
  305. data/dist/ice/cpp/src/Ice/SSL/SSLInstance.h +26 -0
  306. data/dist/ice/cpp/src/Ice/SSL/SSLInstanceF.h +19 -0
  307. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.cpp +673 -0
  308. data/dist/ice/cpp/src/Ice/SSL/SSLUtil.h +118 -0
  309. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.cpp +1449 -0
  310. data/dist/ice/cpp/src/Ice/SSL/SchannelEngine.h +58 -0
  311. data/dist/ice/cpp/src/Ice/SSL/SchannelEngineF.h +18 -0
  312. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.cpp +1088 -0
  313. data/dist/ice/cpp/src/Ice/SSL/SchannelTransceiverI.h +118 -0
  314. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.cpp +825 -0
  315. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngine.h +44 -0
  316. data/dist/ice/cpp/src/Ice/SSL/SecureTransportEngineF.h +18 -0
  317. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.cpp +621 -0
  318. data/dist/ice/cpp/src/Ice/SSL/SecureTransportTransceiverI.h +91 -0
  319. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.cpp +1048 -0
  320. data/dist/ice/cpp/src/Ice/SSL/SecureTransportUtil.h +40 -0
  321. data/dist/ice/cpp/src/Ice/SSL/TrustManager.cpp +233 -0
  322. data/dist/ice/cpp/src/Ice/SSL/TrustManager.h +42 -0
  323. data/dist/ice/cpp/src/Ice/SSL/TrustManagerF.h +14 -0
  324. data/dist/ice/cpp/src/Ice/ScannerConfig.h +35 -0
  325. data/dist/ice/cpp/src/Ice/Selector.cpp +341 -606
  326. data/dist/ice/cpp/src/Ice/Selector.h +167 -224
  327. data/dist/ice/cpp/src/Ice/ServantManager.cpp +195 -128
  328. data/dist/ice/cpp/src/Ice/ServantManager.h +52 -55
  329. data/dist/ice/cpp/src/Ice/ServantManagerF.h +14 -0
  330. data/dist/ice/cpp/src/Ice/Service.cpp +548 -641
  331. data/dist/ice/cpp/src/Ice/SharedContext.h +13 -26
  332. data/dist/ice/cpp/src/Ice/SliceLoader.cpp +53 -0
  333. data/dist/ice/cpp/src/Ice/SlicedData.cpp +17 -96
  334. data/dist/ice/cpp/src/Ice/StreamSocket.cpp +104 -151
  335. data/dist/ice/cpp/src/Ice/StreamSocket.h +48 -60
  336. data/dist/ice/cpp/src/Ice/StringConverter.cpp +586 -0
  337. data/dist/ice/cpp/src/Ice/StringUtil.cpp +1137 -0
  338. data/dist/ice/cpp/src/Ice/SysLoggerI.cpp +41 -47
  339. data/dist/ice/cpp/src/Ice/SysLoggerI.h +24 -27
  340. data/dist/ice/cpp/src/Ice/SystemdJournalI.cpp +16 -17
  341. data/dist/ice/cpp/src/Ice/SystemdJournalI.h +19 -25
  342. data/dist/ice/cpp/src/Ice/TargetCompare.h +96 -0
  343. data/dist/ice/cpp/src/Ice/TcpAcceptor.cpp +67 -88
  344. data/dist/ice/cpp/src/Ice/TcpAcceptor.h +34 -40
  345. data/dist/ice/cpp/src/Ice/TcpConnector.cpp +42 -41
  346. data/dist/ice/cpp/src/Ice/TcpConnector.h +26 -35
  347. data/dist/ice/cpp/src/Ice/TcpEndpointI.cpp +172 -146
  348. data/dist/ice/cpp/src/Ice/TcpEndpointI.h +76 -80
  349. data/dist/ice/cpp/src/Ice/TcpTransceiver.cpp +38 -26
  350. data/dist/ice/cpp/src/Ice/TcpTransceiver.h +40 -45
  351. data/dist/ice/cpp/src/Ice/ThreadPool.cpp +333 -515
  352. data/dist/ice/cpp/src/Ice/ThreadPool.h +202 -290
  353. data/dist/ice/cpp/src/Ice/ThreadPoolF.h +14 -0
  354. data/dist/ice/cpp/src/Ice/TimeUtil.cpp +47 -0
  355. data/dist/ice/cpp/src/Ice/TimeUtil.h +21 -0
  356. data/dist/ice/cpp/src/Ice/Timer.cpp +73 -167
  357. data/dist/ice/cpp/src/Ice/Timer.h +212 -0
  358. data/dist/ice/cpp/src/Ice/TraceLevels.cpp +11 -29
  359. data/dist/ice/cpp/src/Ice/TraceLevels.h +22 -28
  360. data/dist/ice/cpp/src/Ice/TraceLevelsF.h +4 -11
  361. data/dist/ice/cpp/src/Ice/TraceUtil.cpp +136 -215
  362. data/dist/ice/cpp/src/Ice/TraceUtil.h +27 -16
  363. data/dist/ice/cpp/src/Ice/Transceiver.cpp +3 -7
  364. data/dist/ice/cpp/src/Ice/Transceiver.h +35 -32
  365. data/dist/ice/cpp/src/Ice/TransceiverF.h +10 -20
  366. data/dist/ice/cpp/src/Ice/UUID.cpp +79 -0
  367. data/dist/ice/cpp/src/Ice/UdpConnector.cpp +39 -39
  368. data/dist/ice/cpp/src/Ice/UdpConnector.h +27 -36
  369. data/dist/ice/cpp/src/Ice/UdpEndpointI.cpp +178 -213
  370. data/dist/ice/cpp/src/Ice/UdpEndpointI.h +82 -85
  371. data/dist/ice/cpp/src/Ice/UdpTransceiver.cpp +201 -221
  372. data/dist/ice/cpp/src/Ice/UdpTransceiver.h +68 -74
  373. data/dist/ice/cpp/{include/IceUtil → src/Ice}/UndefSysMacros.h +12 -12
  374. data/dist/ice/cpp/src/Ice/UniqueRef.h +77 -0
  375. data/dist/ice/cpp/src/Ice/UserException.cpp +58 -0
  376. data/dist/ice/cpp/src/Ice/Value.cpp +107 -38
  377. data/dist/ice/cpp/src/Ice/WSAcceptor.cpp +10 -15
  378. data/dist/ice/cpp/src/Ice/WSAcceptor.h +31 -37
  379. data/dist/ice/cpp/src/Ice/WSConnector.cpp +25 -40
  380. data/dist/ice/cpp/src/Ice/WSConnector.h +26 -33
  381. data/dist/ice/cpp/src/Ice/WSEndpoint.cpp +164 -217
  382. data/dist/ice/cpp/src/Ice/WSEndpoint.h +72 -83
  383. data/dist/ice/cpp/src/Ice/WSTransceiver.cpp +469 -458
  384. data/dist/ice/cpp/src/Ice/WSTransceiver.h +117 -123
  385. data/dist/ice/cpp/src/Ice/generated/BuiltinSequences.cpp +20 -29
  386. data/dist/ice/cpp/src/Ice/generated/Context.cpp +40 -0
  387. data/dist/ice/cpp/src/Ice/generated/EndpointTypes.cpp +20 -31
  388. data/dist/ice/cpp/src/Ice/generated/Identity.cpp +24 -34
  389. data/dist/ice/cpp/src/Ice/generated/Locator.cpp +454 -1744
  390. data/dist/ice/cpp/src/Ice/generated/LocatorRegistry.cpp +577 -0
  391. data/dist/ice/cpp/src/Ice/generated/Metrics.cpp +824 -1971
  392. data/dist/ice/cpp/src/Ice/generated/OperationMode.cpp +56 -0
  393. data/dist/ice/cpp/src/Ice/generated/Process.cpp +190 -331
  394. data/dist/ice/cpp/src/Ice/generated/PropertiesAdmin.cpp +289 -449
  395. data/dist/ice/cpp/src/Ice/generated/PropertyDict.cpp +40 -0
  396. data/dist/ice/cpp/src/Ice/generated/RemoteLogger.cpp +547 -867
  397. data/dist/ice/cpp/src/Ice/generated/ReplyStatus.cpp +70 -0
  398. data/dist/ice/cpp/src/Ice/generated/Router.cpp +406 -723
  399. data/dist/ice/cpp/src/Ice/generated/SliceChecksumDict.cpp +19 -29
  400. data/dist/ice/cpp/src/Ice/generated/Version.cpp +28 -31
  401. data/dist/ice/cpp/src/IceDiscovery/LocatorI.cpp +76 -139
  402. data/dist/ice/cpp/src/IceDiscovery/LocatorI.h +55 -96
  403. data/dist/ice/cpp/src/IceDiscovery/LookupI.cpp +190 -303
  404. data/dist/ice/cpp/src/IceDiscovery/LookupI.h +126 -185
  405. data/dist/ice/cpp/src/IceDiscovery/PluginI.cpp +56 -77
  406. data/dist/ice/cpp/src/IceDiscovery/PluginI.h +20 -25
  407. data/dist/ice/cpp/src/IceDiscovery/generated/Lookup.cpp +638 -0
  408. data/dist/ice/cpp/src/IceLocatorDiscovery/Plugin.h +14 -37
  409. data/dist/ice/cpp/src/IceLocatorDiscovery/PluginI.cpp +411 -649
  410. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/Lookup.cpp +468 -0
  411. data/dist/ice/cpp/src/Slice/DeprecationReporter.cpp +172 -0
  412. data/dist/ice/cpp/src/Slice/DeprecationReporter.h +14 -0
  413. data/dist/ice/cpp/src/Slice/DocCommentParser.cpp +736 -0
  414. data/dist/ice/cpp/src/Slice/DocCommentParser.h +61 -0
  415. data/dist/ice/cpp/src/Slice/FileTracker.cpp +25 -75
  416. data/dist/ice/cpp/src/Slice/FileTracker.h +35 -56
  417. data/dist/ice/cpp/src/Slice/Grammar.cpp +2711 -3382
  418. data/dist/ice/cpp/src/Slice/Grammar.h +95 -75
  419. data/dist/ice/cpp/src/Slice/GrammarUtil.h +117 -217
  420. data/dist/ice/cpp/src/Slice/MetadataValidation.cpp +486 -0
  421. data/dist/ice/cpp/src/Slice/MetadataValidation.h +106 -0
  422. data/dist/ice/cpp/src/Slice/Parser.cpp +3068 -5223
  423. data/dist/ice/cpp/src/Slice/Parser.h +1086 -1065
  424. data/dist/ice/cpp/src/Slice/Preprocessor.cpp +97 -599
  425. data/dist/ice/cpp/src/Slice/Preprocessor.h +26 -42
  426. data/dist/ice/cpp/src/Slice/Scanner.cpp +1562 -924
  427. data/dist/ice/cpp/src/Slice/SliceUtil.cpp +517 -113
  428. data/dist/ice/cpp/src/Slice/StringLiteralUtil.cpp +254 -269
  429. data/dist/ice/cpp/src/Slice/Util.h +126 -35
  430. data/dist/ice/cpp/src/slice2rb/Main.cpp +13 -15
  431. data/dist/ice/cpp/src/slice2rb/Ruby.cpp +250 -0
  432. data/dist/ice/cpp/src/slice2rb/RubyUtil.cpp +1197 -0
  433. data/dist/ice/cpp/src/slice2rb/RubyUtil.h +56 -0
  434. data/dist/ice/slice/Glacier2/Metrics.ice +34 -75
  435. data/dist/ice/slice/Glacier2/PermissionsVerifier.ice +42 -98
  436. data/dist/ice/slice/Glacier2/Router.ice +80 -173
  437. data/dist/ice/slice/Glacier2/SSLInfo.ice +23 -40
  438. data/dist/ice/slice/Glacier2/Session.ice +120 -261
  439. data/dist/ice/slice/Ice/BuiltinSequences.ice +33 -38
  440. data/dist/ice/slice/Ice/Context.ice +24 -0
  441. data/dist/ice/slice/Ice/EndpointTypes.ice +35 -33
  442. data/dist/ice/slice/Ice/Identity.ice +24 -63
  443. data/dist/ice/slice/Ice/Locator.ice +61 -226
  444. data/dist/ice/slice/Ice/LocatorRegistry.ice +77 -0
  445. data/dist/ice/slice/Ice/Metrics.ice +189 -424
  446. data/dist/ice/slice/Ice/OperationMode.ice +38 -0
  447. data/dist/ice/slice/Ice/Process.ice +16 -52
  448. data/dist/ice/slice/Ice/PropertiesAdmin.ice +25 -75
  449. data/dist/ice/slice/Ice/PropertyDict.ice +23 -0
  450. data/dist/ice/slice/Ice/RemoteLogger.ice +113 -213
  451. data/dist/ice/slice/Ice/ReplyStatus.ice +65 -0
  452. data/dist/ice/slice/Ice/Router.ice +42 -91
  453. data/dist/ice/slice/Ice/SliceChecksumDict.ice +7 -25
  454. data/dist/ice/slice/Ice/Version.ice +31 -39
  455. data/dist/ice/slice/IceBox/ServiceManager.ice +79 -0
  456. data/dist/ice/slice/IceGrid/Admin.ice +942 -1918
  457. data/dist/ice/slice/IceGrid/Descriptor.ice +476 -1051
  458. data/dist/ice/slice/IceGrid/Exception.ice +86 -384
  459. data/dist/ice/slice/IceGrid/FileParser.ice +23 -59
  460. data/dist/ice/slice/IceGrid/Registry.ice +117 -256
  461. data/dist/ice/slice/IceGrid/Session.ice +46 -110
  462. data/dist/ice/slice/IceGrid/UserAccountMapper.ice +22 -57
  463. data/dist/ice/slice/IceStorm/IceStorm.ice +173 -401
  464. data/dist/ice/slice/IceStorm/Metrics.ice +28 -70
  465. data/dist/lib/Glacier2/Metrics.rb +16 -31
  466. data/dist/lib/Glacier2/PermissionsVerifier.rb +18 -50
  467. data/dist/lib/Glacier2/Router.rb +20 -42
  468. data/dist/lib/Glacier2/SSLInfo.rb +14 -22
  469. data/dist/lib/Glacier2/Session.rb +53 -113
  470. data/dist/lib/Glacier2.rb +6 -6
  471. data/dist/lib/Ice/BuiltinSequences.rb +14 -26
  472. data/dist/lib/Ice/CompressBatch.rb +50 -0
  473. data/dist/lib/Ice/Context.rb +12 -0
  474. data/dist/lib/Ice/EndpointSelectionType.rb +49 -0
  475. data/dist/lib/Ice/EndpointTypes.rb +14 -55
  476. data/dist/lib/Ice/Exception.rb +20 -0
  477. data/dist/lib/Ice/Identity.rb +10 -26
  478. data/dist/lib/Ice/IdentitySpaceship.rb +16 -0
  479. data/dist/lib/Ice/InitializationData.rb +12 -0
  480. data/dist/lib/Ice/LocalExceptions.rb +168 -0
  481. data/dist/lib/Ice/Locator.rb +21 -134
  482. data/dist/lib/Ice/LocatorRegistry.rb +73 -0
  483. data/dist/lib/Ice/Metrics.rb +85 -132
  484. data/dist/lib/Ice/OperationMode.rb +58 -0
  485. data/dist/lib/Ice/Process.rb +12 -31
  486. data/dist/lib/Ice/PropertiesAdmin.rb +12 -36
  487. data/dist/lib/Ice/PropertyDict.rb +12 -0
  488. data/dist/lib/Ice/Proxy.rb +85 -0
  489. data/dist/lib/Ice/ProxyFunctions.rb +69 -0
  490. data/dist/lib/Ice/RemoteLogger.rb +29 -60
  491. data/dist/lib/Ice/ReplyStatus.rb +65 -0
  492. data/dist/lib/Ice/Router.rb +19 -47
  493. data/dist/lib/Ice/SliceChecksumDict.rb +5 -17
  494. data/dist/lib/Ice/SliceUtil.rb +41 -0
  495. data/dist/lib/Ice/Struct.rb +11 -0
  496. data/dist/lib/Ice/ToStringMode.rb +50 -0
  497. data/dist/lib/Ice/Value.rb +93 -0
  498. data/dist/lib/Ice/Version.rb +12 -24
  499. data/dist/lib/Ice.rb +29 -665
  500. data/dist/lib/IceBox/ServiceManager.rb +104 -0
  501. data/dist/lib/IceBox.rb +2 -4
  502. data/dist/lib/IceGrid/Admin.rb +303 -291
  503. data/dist/lib/IceGrid/Descriptor.rb +147 -192
  504. data/dist/lib/IceGrid/Exception.rb +26 -257
  505. data/dist/lib/IceGrid/FileParser.rb +12 -36
  506. data/dist/lib/IceGrid/Registry.rb +35 -76
  507. data/dist/lib/IceGrid/Session.rb +19 -34
  508. data/dist/lib/IceGrid/UserAccountMapper.rb +11 -34
  509. data/dist/lib/IceGrid.rb +3 -3
  510. data/dist/lib/IceStorm/IceStorm.rb +51 -132
  511. data/dist/lib/IceStorm/Metrics.rb +19 -37
  512. data/dist/lib/IceStorm.rb +3 -5
  513. data/extconf.rb +6 -8
  514. data/ice.gemspec +3 -3
  515. data/scripts/slice2rb +1 -3
  516. metadata +206 -386
  517. data/dist/IceRuby/ValueFactoryManager.cpp +0 -445
  518. data/dist/IceRuby/ValueFactoryManager.h +0 -95
  519. data/dist/ice/cpp/include/Ice/Application.h +0 -326
  520. data/dist/ice/cpp/include/Ice/AsyncResult.h +0 -155
  521. data/dist/ice/cpp/include/Ice/AsyncResultF.h +0 -23
  522. data/dist/ice/cpp/include/Ice/BatchRequestInterceptor.h +0 -75
  523. data/dist/ice/cpp/include/Ice/CommunicatorAsync.h +0 -154
  524. data/dist/ice/cpp/include/Ice/Comparable.h +0 -205
  525. data/dist/ice/cpp/include/Ice/ConnectionAsync.h +0 -302
  526. data/dist/ice/cpp/include/Ice/ConsoleUtil.h +0 -23
  527. data/dist/ice/cpp/include/Ice/DefaultValueFactory.h +0 -57
  528. data/dist/ice/cpp/include/Ice/DispatchInterceptor.h +0 -41
  529. data/dist/ice/cpp/include/Ice/Dispatcher.h +0 -67
  530. data/dist/ice/cpp/include/Ice/DynamicLibrary.h +0 -102
  531. data/dist/ice/cpp/include/Ice/DynamicLibraryF.h +0 -24
  532. data/dist/ice/cpp/include/Ice/ExceptionHelpers.h +0 -74
  533. data/dist/ice/cpp/include/Ice/FactoryTable.h +0 -73
  534. data/dist/ice/cpp/include/Ice/FactoryTableInit.h +0 -84
  535. data/dist/ice/cpp/include/Ice/Functional.h +0 -140
  536. data/dist/ice/cpp/include/Ice/GCObject.h +0 -76
  537. data/dist/ice/cpp/include/Ice/Handle.h +0 -182
  538. data/dist/ice/cpp/include/Ice/Incoming.h +0 -225
  539. data/dist/ice/cpp/include/Ice/IncomingAsync.h +0 -186
  540. data/dist/ice/cpp/include/Ice/IncomingAsyncF.h +0 -36
  541. data/dist/ice/cpp/include/Ice/InterfaceByValue.h +0 -57
  542. data/dist/ice/cpp/include/Ice/LocalObject.h +0 -35
  543. data/dist/ice/cpp/include/Ice/LocalObjectF.h +0 -21
  544. data/dist/ice/cpp/include/Ice/MetricsAdminI.h +0 -715
  545. data/dist/ice/cpp/include/Ice/MetricsFunctional.h +0 -159
  546. data/dist/ice/cpp/include/Ice/MetricsObserverI.h +0 -669
  547. data/dist/ice/cpp/include/Ice/Optional.h +0 -1114
  548. data/dist/ice/cpp/include/Ice/OutgoingAsyncF.h +0 -39
  549. data/dist/ice/cpp/include/Ice/Protocol.h +0 -274
  550. data/dist/ice/cpp/include/Ice/ProxyFactoryF.h +0 -21
  551. data/dist/ice/cpp/include/Ice/ProxyHandle.h +0 -318
  552. data/dist/ice/cpp/include/Ice/RegisterPlugins.h +0 -127
  553. data/dist/ice/cpp/include/Ice/ResponseHandlerF.h +0 -25
  554. data/dist/ice/cpp/include/Ice/SHA1.h +0 -40
  555. data/dist/ice/cpp/include/Ice/ServantManagerF.h +0 -21
  556. data/dist/ice/cpp/include/Ice/SliceChecksums.h +0 -33
  557. data/dist/ice/cpp/include/Ice/ThreadPoolF.h +0 -23
  558. data/dist/ice/cpp/include/Ice/UniquePtr.h +0 -95
  559. data/dist/ice/cpp/include/Ice/UniqueRef.h +0 -97
  560. data/dist/ice/cpp/include/IceSSL/Config.h +0 -21
  561. data/dist/ice/cpp/include/IceSSL/IceSSL.h +0 -24
  562. data/dist/ice/cpp/include/IceSSL/OpenSSL.h +0 -147
  563. data/dist/ice/cpp/include/IceSSL/Plugin.h +0 -712
  564. data/dist/ice/cpp/include/IceSSL/SChannel.h +0 -72
  565. data/dist/ice/cpp/include/IceSSL/SecureTransport.h +0 -72
  566. data/dist/ice/cpp/include/IceUtil/Atomic.h +0 -179
  567. data/dist/ice/cpp/include/IceUtil/Cond.h +0 -317
  568. data/dist/ice/cpp/include/IceUtil/Config.h +0 -392
  569. data/dist/ice/cpp/include/IceUtil/ConsoleUtil.h +0 -92
  570. data/dist/ice/cpp/include/IceUtil/CountDownLatch.h +0 -45
  571. data/dist/ice/cpp/include/IceUtil/CtrlCHandler.h +0 -96
  572. data/dist/ice/cpp/include/IceUtil/DisableWarnings.h +0 -44
  573. data/dist/ice/cpp/include/IceUtil/Exception.h +0 -394
  574. data/dist/ice/cpp/include/IceUtil/FileUtil.h +0 -140
  575. data/dist/ice/cpp/include/IceUtil/Functional.h +0 -389
  576. data/dist/ice/cpp/include/IceUtil/Handle.h +0 -261
  577. data/dist/ice/cpp/include/IceUtil/IceUtil.h +0 -40
  578. data/dist/ice/cpp/include/IceUtil/InputUtil.h +0 -42
  579. data/dist/ice/cpp/include/IceUtil/Iterator.h +0 -31
  580. data/dist/ice/cpp/include/IceUtil/Lock.h +0 -128
  581. data/dist/ice/cpp/include/IceUtil/Monitor.h +0 -243
  582. data/dist/ice/cpp/include/IceUtil/Mutex.h +0 -349
  583. data/dist/ice/cpp/include/IceUtil/MutexProtocol.h +0 -23
  584. data/dist/ice/cpp/include/IceUtil/MutexPtrLock.h +0 -78
  585. data/dist/ice/cpp/include/IceUtil/MutexPtrTryLock.h +0 -77
  586. data/dist/ice/cpp/include/IceUtil/Optional.h +0 -433
  587. data/dist/ice/cpp/include/IceUtil/Options.h +0 -135
  588. data/dist/ice/cpp/include/IceUtil/OutputUtil.h +0 -383
  589. data/dist/ice/cpp/include/IceUtil/PushDisableWarnings.h +0 -33
  590. data/dist/ice/cpp/include/IceUtil/Random.h +0 -55
  591. data/dist/ice/cpp/include/IceUtil/RecMutex.h +0 -107
  592. data/dist/ice/cpp/include/IceUtil/ResourceConfig.h +0 -37
  593. data/dist/ice/cpp/include/IceUtil/ScannerConfig.h +0 -40
  594. data/dist/ice/cpp/include/IceUtil/ScopedArray.h +0 -98
  595. data/dist/ice/cpp/include/IceUtil/Shared.h +0 -127
  596. data/dist/ice/cpp/include/IceUtil/StopWatch.h +0 -49
  597. data/dist/ice/cpp/include/IceUtil/StringConverter.h +0 -195
  598. data/dist/ice/cpp/include/IceUtil/StringUtil.h +0 -97
  599. data/dist/ice/cpp/include/IceUtil/Thread.h +0 -160
  600. data/dist/ice/cpp/include/IceUtil/ThreadException.h +0 -94
  601. data/dist/ice/cpp/include/IceUtil/Time.h +0 -205
  602. data/dist/ice/cpp/include/IceUtil/Timer.h +0 -153
  603. data/dist/ice/cpp/include/IceUtil/UUID.h +0 -21
  604. data/dist/ice/cpp/include/generated/Glacier2/Metrics.h +0 -475
  605. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifier.h +0 -1430
  606. data/dist/ice/cpp/include/generated/Glacier2/PermissionsVerifierF.h +0 -147
  607. data/dist/ice/cpp/include/generated/Glacier2/Router.h +0 -3260
  608. data/dist/ice/cpp/include/generated/Glacier2/RouterF.h +0 -125
  609. data/dist/ice/cpp/include/generated/Glacier2/SSLInfo.h +0 -223
  610. data/dist/ice/cpp/include/generated/Glacier2/Session.h +0 -5894
  611. data/dist/ice/cpp/include/generated/Ice/Communicator.h +0 -1162
  612. data/dist/ice/cpp/include/generated/Ice/CommunicatorF.h +0 -101
  613. data/dist/ice/cpp/include/generated/Ice/Connection.h +0 -1703
  614. data/dist/ice/cpp/include/generated/Ice/ConnectionF.h +0 -119
  615. data/dist/ice/cpp/include/generated/Ice/Current.h +0 -322
  616. data/dist/ice/cpp/include/generated/Ice/Endpoint.h +0 -979
  617. data/dist/ice/cpp/include/generated/Ice/EndpointF.h +0 -166
  618. data/dist/ice/cpp/include/generated/Ice/FacetMap.h +0 -80
  619. data/dist/ice/cpp/include/generated/Ice/ImplicitContext.h +0 -284
  620. data/dist/ice/cpp/include/generated/Ice/ImplicitContextF.h +0 -101
  621. data/dist/ice/cpp/include/generated/Ice/Instrumentation.h +0 -1203
  622. data/dist/ice/cpp/include/generated/Ice/InstrumentationF.h +0 -128
  623. data/dist/ice/cpp/include/generated/Ice/LocalException.h +0 -7437
  624. data/dist/ice/cpp/include/generated/Ice/LocatorF.h +0 -147
  625. data/dist/ice/cpp/include/generated/Ice/Logger.h +0 -237
  626. data/dist/ice/cpp/include/generated/Ice/LoggerF.h +0 -101
  627. data/dist/ice/cpp/include/generated/Ice/ObjectAdapter.h +0 -1181
  628. data/dist/ice/cpp/include/generated/Ice/ObjectAdapterF.h +0 -101
  629. data/dist/ice/cpp/include/generated/Ice/ObjectFactory.h +0 -203
  630. data/dist/ice/cpp/include/generated/Ice/Plugin.h +0 -318
  631. data/dist/ice/cpp/include/generated/Ice/PluginF.h +0 -110
  632. data/dist/ice/cpp/include/generated/Ice/ProcessF.h +0 -125
  633. data/dist/ice/cpp/include/generated/Ice/Properties.h +0 -452
  634. data/dist/ice/cpp/include/generated/Ice/PropertiesF.h +0 -134
  635. data/dist/ice/cpp/include/generated/Ice/RouterF.h +0 -125
  636. data/dist/ice/cpp/include/generated/Ice/ServantLocator.h +0 -305
  637. data/dist/ice/cpp/include/generated/Ice/ServantLocatorF.h +0 -101
  638. data/dist/ice/cpp/include/generated/Ice/ValueFactory.h +0 -330
  639. data/dist/ice/cpp/include/generated/IceBox/IceBox.h +0 -3269
  640. data/dist/ice/cpp/include/generated/IceGrid/Admin.h +0 -33773
  641. data/dist/ice/cpp/include/generated/IceGrid/Descriptor.h +0 -5254
  642. data/dist/ice/cpp/include/generated/IceGrid/Exception.h +0 -2834
  643. data/dist/ice/cpp/include/generated/IceGrid/FileParser.h +0 -824
  644. data/dist/ice/cpp/include/generated/IceGrid/PluginFacade.h +0 -635
  645. data/dist/ice/cpp/include/generated/IceGrid/Registry.h +0 -5089
  646. data/dist/ice/cpp/include/generated/IceGrid/Session.h +0 -2240
  647. data/dist/ice/cpp/include/generated/IceGrid/UserAccountMapper.h +0 -800
  648. data/dist/ice/cpp/include/generated/IcePatch2/FileInfo.h +0 -325
  649. data/dist/ice/cpp/include/generated/IcePatch2/FileServer.h +0 -2891
  650. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfo.h +0 -228
  651. data/dist/ice/cpp/include/generated/IceSSL/ConnectionInfoF.h +0 -101
  652. data/dist/ice/cpp/include/generated/IceSSL/EndpointInfo.h +0 -186
  653. data/dist/ice/cpp/include/generated/IceStorm/IceStorm.h +0 -6627
  654. data/dist/ice/cpp/include/generated/IceStorm/Metrics.h +0 -665
  655. data/dist/ice/cpp/src/Ice/ACM.cpp +0 -380
  656. data/dist/ice/cpp/src/Ice/ACM.h +0 -119
  657. data/dist/ice/cpp/src/Ice/ACMF.h +0 -30
  658. data/dist/ice/cpp/src/Ice/Acceptor.cpp +0 -16
  659. data/dist/ice/cpp/src/Ice/Application.cpp +0 -661
  660. data/dist/ice/cpp/src/Ice/AsyncResult.cpp +0 -70
  661. data/dist/ice/cpp/src/Ice/CommunicatorI.cpp +0 -586
  662. data/dist/ice/cpp/src/Ice/CommunicatorI.h +0 -167
  663. data/dist/ice/cpp/src/Ice/Cond.cpp +0 -381
  664. data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.cpp +0 -73
  665. data/dist/ice/cpp/src/Ice/ConnectionRequestHandler.h +0 -41
  666. data/dist/ice/cpp/src/Ice/Connector.cpp +0 -16
  667. data/dist/ice/cpp/src/Ice/CountDownLatch.cpp +0 -171
  668. data/dist/ice/cpp/src/Ice/DispatchInterceptor.cpp +0 -37
  669. data/dist/ice/cpp/src/Ice/FactoryTable.cpp +0 -162
  670. data/dist/ice/cpp/src/Ice/FactoryTableInit.cpp +0 -88
  671. data/dist/ice/cpp/src/Ice/GCObject.cpp +0 -442
  672. data/dist/ice/cpp/src/Ice/IconvStringConverter.cpp +0 -51
  673. data/dist/ice/cpp/src/Ice/ImplicitContextI.cpp +0 -655
  674. data/dist/ice/cpp/src/Ice/ImplicitContextI.h +0 -48
  675. data/dist/ice/cpp/src/Ice/Incoming.cpp +0 -795
  676. data/dist/ice/cpp/src/Ice/IncomingAsync.cpp +0 -230
  677. data/dist/ice/cpp/src/Ice/IncomingRequest.h +0 -33
  678. data/dist/ice/cpp/src/Ice/LocalObject.cpp +0 -23
  679. data/dist/ice/cpp/src/Ice/MetricsObserverI.cpp +0 -8
  680. data/dist/ice/cpp/src/Ice/PropertiesAdminI.cpp +0 -265
  681. data/dist/ice/cpp/src/Ice/PropertiesAdminI.h +0 -64
  682. data/dist/ice/cpp/src/Ice/PropertiesI.cpp +0 -739
  683. data/dist/ice/cpp/src/Ice/PropertiesI.h +0 -70
  684. data/dist/ice/cpp/src/Ice/ProtocolPluginFacadeF.h +0 -21
  685. data/dist/ice/cpp/src/Ice/ProxyFactory.cpp +0 -300
  686. data/dist/ice/cpp/src/Ice/ProxyFactory.h +0 -57
  687. data/dist/ice/cpp/src/Ice/RegisterPluginsInit.cpp +0 -38
  688. data/dist/ice/cpp/src/Ice/RegisterPluginsInit.h +0 -20
  689. data/dist/ice/cpp/src/Ice/ReplyStatus.h +0 -24
  690. data/dist/ice/cpp/src/Ice/RequestHandlerFactory.cpp +0 -77
  691. data/dist/ice/cpp/src/Ice/RequestHandlerFactory.h +0 -37
  692. data/dist/ice/cpp/src/Ice/ResponseHandler.cpp +0 -12
  693. data/dist/ice/cpp/src/Ice/ResponseHandler.h +0 -43
  694. data/dist/ice/cpp/src/Ice/SliceChecksums.cpp +0 -75
  695. data/dist/ice/cpp/src/Ice/StringConverterPlugin.cpp +0 -192
  696. data/dist/ice/cpp/src/Ice/StringUtil.h +0 -30
  697. data/dist/ice/cpp/src/Ice/Thread.cpp +0 -569
  698. data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.cpp +0 -61
  699. data/dist/ice/cpp/src/Ice/ValueFactoryManagerI.h +0 -37
  700. data/dist/ice/cpp/src/Ice/VirtualShared.h +0 -38
  701. data/dist/ice/cpp/src/Ice/generated/Communicator.cpp +0 -79
  702. data/dist/ice/cpp/src/Ice/generated/CommunicatorF.cpp +0 -61
  703. data/dist/ice/cpp/src/Ice/generated/Connection.cpp +0 -155
  704. data/dist/ice/cpp/src/Ice/generated/ConnectionF.cpp +0 -61
  705. data/dist/ice/cpp/src/Ice/generated/Current.cpp +0 -62
  706. data/dist/ice/cpp/src/Ice/generated/Endpoint.cpp +0 -147
  707. data/dist/ice/cpp/src/Ice/generated/EndpointF.cpp +0 -61
  708. data/dist/ice/cpp/src/Ice/generated/FacetMap.cpp +0 -49
  709. data/dist/ice/cpp/src/Ice/generated/ImplicitContext.cpp +0 -75
  710. data/dist/ice/cpp/src/Ice/generated/ImplicitContextF.cpp +0 -61
  711. data/dist/ice/cpp/src/Ice/generated/Instrumentation.cpp +0 -188
  712. data/dist/ice/cpp/src/Ice/generated/InstrumentationF.cpp +0 -66
  713. data/dist/ice/cpp/src/Ice/generated/LocalException.cpp +0 -3262
  714. data/dist/ice/cpp/src/Ice/generated/LocatorF.cpp +0 -63
  715. data/dist/ice/cpp/src/Ice/generated/Logger.cpp +0 -73
  716. data/dist/ice/cpp/src/Ice/generated/LoggerF.cpp +0 -61
  717. data/dist/ice/cpp/src/Ice/generated/ObjectAdapter.cpp +0 -79
  718. data/dist/ice/cpp/src/Ice/generated/ObjectAdapterF.cpp +0 -61
  719. data/dist/ice/cpp/src/Ice/generated/ObjectFactory.cpp +0 -75
  720. data/dist/ice/cpp/src/Ice/generated/Plugin.cpp +0 -87
  721. data/dist/ice/cpp/src/Ice/generated/PluginF.cpp +0 -61
  722. data/dist/ice/cpp/src/Ice/generated/ProcessF.cpp +0 -63
  723. data/dist/ice/cpp/src/Ice/generated/Properties.cpp +0 -78
  724. data/dist/ice/cpp/src/Ice/generated/PropertiesF.cpp +0 -63
  725. data/dist/ice/cpp/src/Ice/generated/RouterF.cpp +0 -63
  726. data/dist/ice/cpp/src/Ice/generated/ServantLocator.cpp +0 -75
  727. data/dist/ice/cpp/src/Ice/generated/ServantLocatorF.cpp +0 -61
  728. data/dist/ice/cpp/src/Ice/generated/ValueFactory.cpp +0 -83
  729. data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.cpp +0 -154
  730. data/dist/ice/cpp/src/Ice/ios/StreamAcceptor.h +0 -49
  731. data/dist/ice/cpp/src/Ice/ios/StreamConnector.cpp +0 -146
  732. data/dist/ice/cpp/src/Ice/ios/StreamConnector.h +0 -52
  733. data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.cpp +0 -477
  734. data/dist/ice/cpp/src/Ice/ios/StreamEndpointI.h +0 -156
  735. data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.cpp +0 -570
  736. data/dist/ice/cpp/src/Ice/ios/StreamTransceiver.h +0 -93
  737. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery/IceDiscovery.h +0 -1889
  738. data/dist/ice/cpp/src/IceDiscovery/generated/IceDiscovery.cpp +0 -915
  739. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery/IceLocatorDiscovery.h +0 -1197
  740. data/dist/ice/cpp/src/IceLocatorDiscovery/generated/IceLocatorDiscovery.cpp +0 -730
  741. data/dist/ice/cpp/src/IceSSL/AcceptorI.cpp +0 -105
  742. data/dist/ice/cpp/src/IceSSL/AcceptorI.h +0 -52
  743. data/dist/ice/cpp/src/IceSSL/CertificateI.cpp +0 -301
  744. data/dist/ice/cpp/src/IceSSL/CertificateI.h +0 -64
  745. data/dist/ice/cpp/src/IceSSL/ConnectorI.cpp +0 -102
  746. data/dist/ice/cpp/src/IceSSL/ConnectorI.h +0 -44
  747. data/dist/ice/cpp/src/IceSSL/EndpointI.cpp +0 -372
  748. data/dist/ice/cpp/src/IceSSL/EndpointI.h +0 -100
  749. data/dist/ice/cpp/src/IceSSL/Instance.cpp +0 -28
  750. data/dist/ice/cpp/src/IceSSL/Instance.h +0 -37
  751. data/dist/ice/cpp/src/IceSSL/InstanceF.h +0 -33
  752. data/dist/ice/cpp/src/IceSSL/OpenSSLCertificateI.cpp +0 -688
  753. data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.cpp +0 -1147
  754. data/dist/ice/cpp/src/IceSSL/OpenSSLEngine.h +0 -59
  755. data/dist/ice/cpp/src/IceSSL/OpenSSLEngineF.h +0 -27
  756. data/dist/ice/cpp/src/IceSSL/OpenSSLPluginI.cpp +0 -127
  757. data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.cpp +0 -1092
  758. data/dist/ice/cpp/src/IceSSL/OpenSSLTransceiverI.h +0 -90
  759. data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.cpp +0 -288
  760. data/dist/ice/cpp/src/IceSSL/OpenSSLUtil.h +0 -58
  761. data/dist/ice/cpp/src/IceSSL/PluginI.cpp +0 -246
  762. data/dist/ice/cpp/src/IceSSL/PluginI.h +0 -67
  763. data/dist/ice/cpp/src/IceSSL/RFC2253.h +0 -62
  764. data/dist/ice/cpp/src/IceSSL/SChannelCertificateI.cpp +0 -721
  765. data/dist/ice/cpp/src/IceSSL/SChannelEngine.cpp +0 -1283
  766. data/dist/ice/cpp/src/IceSSL/SChannelEngine.h +0 -123
  767. data/dist/ice/cpp/src/IceSSL/SChannelEngineF.h +0 -31
  768. data/dist/ice/cpp/src/IceSSL/SChannelPluginI.cpp +0 -73
  769. data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.cpp +0 -1174
  770. data/dist/ice/cpp/src/IceSSL/SChannelTransceiverI.h +0 -133
  771. data/dist/ice/cpp/src/IceSSL/SSLEngine.cpp +0 -313
  772. data/dist/ice/cpp/src/IceSSL/SSLEngine.h +0 -100
  773. data/dist/ice/cpp/src/IceSSL/SSLEngineF.h +0 -21
  774. data/dist/ice/cpp/src/IceSSL/SecureTransportCertificateI.cpp +0 -999
  775. data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.cpp +0 -1308
  776. data/dist/ice/cpp/src/IceSSL/SecureTransportEngine.h +0 -59
  777. data/dist/ice/cpp/src/IceSSL/SecureTransportEngineF.h +0 -29
  778. data/dist/ice/cpp/src/IceSSL/SecureTransportPluginI.cpp +0 -75
  779. data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.cpp +0 -719
  780. data/dist/ice/cpp/src/IceSSL/SecureTransportTransceiverI.h +0 -92
  781. data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.cpp +0 -868
  782. data/dist/ice/cpp/src/IceSSL/SecureTransportUtil.h +0 -45
  783. data/dist/ice/cpp/src/IceSSL/TrustManager.cpp +0 -236
  784. data/dist/ice/cpp/src/IceSSL/TrustManager.h +0 -46
  785. data/dist/ice/cpp/src/IceSSL/TrustManagerF.h +0 -21
  786. data/dist/ice/cpp/src/IceSSL/Util.cpp +0 -192
  787. data/dist/ice/cpp/src/IceSSL/Util.h +0 -99
  788. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfo.cpp +0 -75
  789. data/dist/ice/cpp/src/IceSSL/generated/ConnectionInfoF.cpp +0 -61
  790. data/dist/ice/cpp/src/IceSSL/generated/EndpointInfo.cpp +0 -75
  791. data/dist/ice/cpp/src/IceUtil/ConvertUTF.cpp +0 -472
  792. data/dist/ice/cpp/src/IceUtil/ConvertUTF.h +0 -147
  793. data/dist/ice/cpp/src/IceUtil/CtrlCHandler.cpp +0 -259
  794. data/dist/ice/cpp/src/IceUtil/FileUtil.cpp +0 -471
  795. data/dist/ice/cpp/src/IceUtil/InputUtil.cpp +0 -36
  796. data/dist/ice/cpp/src/IceUtil/MutexProtocol.cpp +0 -19
  797. data/dist/ice/cpp/src/IceUtil/OutputUtil.cpp +0 -609
  798. data/dist/ice/cpp/src/IceUtil/Random.cpp +0 -180
  799. data/dist/ice/cpp/src/IceUtil/RecMutex.cpp +0 -238
  800. data/dist/ice/cpp/src/IceUtil/Shared.cpp +0 -71
  801. data/dist/ice/cpp/src/IceUtil/StringConverter.cpp +0 -690
  802. data/dist/ice/cpp/src/IceUtil/StringUtil.cpp +0 -1135
  803. data/dist/ice/cpp/src/IceUtil/ThreadException.cpp +0 -130
  804. data/dist/ice/cpp/src/IceUtil/Time.cpp +0 -307
  805. data/dist/ice/cpp/src/IceUtil/UUID.cpp +0 -165
  806. data/dist/ice/cpp/src/IceUtil/Unicode.cpp +0 -183
  807. data/dist/ice/cpp/src/IceUtil/Unicode.h +0 -43
  808. data/dist/ice/cpp/src/IceUtil/UtilException.cpp +0 -839
  809. data/dist/ice/cpp/src/Slice/CPlusPlusUtil.cpp +0 -1810
  810. data/dist/ice/cpp/src/Slice/CPlusPlusUtil.h +0 -72
  811. data/dist/ice/cpp/src/Slice/Checksum.cpp +0 -447
  812. data/dist/ice/cpp/src/Slice/Checksum.h +0 -21
  813. data/dist/ice/cpp/src/Slice/JavaUtil.cpp +0 -5183
  814. data/dist/ice/cpp/src/Slice/JavaUtil.h +0 -407
  815. data/dist/ice/cpp/src/Slice/MD5.cpp +0 -52
  816. data/dist/ice/cpp/src/Slice/MD5.h +0 -39
  817. data/dist/ice/cpp/src/Slice/MD5I.cpp +0 -393
  818. data/dist/ice/cpp/src/Slice/MD5I.h +0 -91
  819. data/dist/ice/cpp/src/Slice/PHPUtil.cpp +0 -157
  820. data/dist/ice/cpp/src/Slice/PHPUtil.h +0 -36
  821. data/dist/ice/cpp/src/Slice/Python.cpp +0 -830
  822. data/dist/ice/cpp/src/Slice/PythonUtil.cpp +0 -3439
  823. data/dist/ice/cpp/src/Slice/PythonUtil.h +0 -70
  824. data/dist/ice/cpp/src/Slice/Ruby.cpp +0 -350
  825. data/dist/ice/cpp/src/Slice/RubyUtil.cpp +0 -1571
  826. data/dist/ice/cpp/src/Slice/RubyUtil.h +0 -49
  827. data/dist/ice/slice/Glacier2/PermissionsVerifierF.ice +0 -30
  828. data/dist/ice/slice/Glacier2/RouterF.ice +0 -29
  829. data/dist/ice/slice/Ice/Communicator.ice +0 -676
  830. data/dist/ice/slice/Ice/CommunicatorF.ice +0 -31
  831. data/dist/ice/slice/Ice/Connection.ice +0 -516
  832. data/dist/ice/slice/Ice/ConnectionF.ice +0 -33
  833. data/dist/ice/slice/Ice/Current.ice +0 -170
  834. data/dist/ice/slice/Ice/Endpoint.ice +0 -291
  835. data/dist/ice/slice/Ice/EndpointF.ice +0 -43
  836. data/dist/ice/slice/Ice/FacetMap.ice +0 -36
  837. data/dist/ice/slice/Ice/ImplicitContext.ice +0 -119
  838. data/dist/ice/slice/Ice/ImplicitContextF.ice +0 -30
  839. data/dist/ice/slice/Ice/Instrumentation.ice +0 -509
  840. data/dist/ice/slice/Ice/InstrumentationF.ice +0 -38
  841. data/dist/ice/slice/Ice/LocalException.ice +0 -1040
  842. data/dist/ice/slice/Ice/LocatorF.ice +0 -32
  843. data/dist/ice/slice/Ice/Logger.ice +0 -99
  844. data/dist/ice/slice/Ice/LoggerF.ice +0 -31
  845. data/dist/ice/slice/Ice/ObjectAdapter.ice +0 -710
  846. data/dist/ice/slice/Ice/ObjectAdapterF.ice +0 -31
  847. data/dist/ice/slice/Ice/ObjectFactory.ice +0 -71
  848. data/dist/ice/slice/Ice/Plugin.ice +0 -131
  849. data/dist/ice/slice/Ice/PluginF.ice +0 -36
  850. data/dist/ice/slice/Ice/ProcessF.ice +0 -31
  851. data/dist/ice/slice/Ice/Properties.ice +0 -244
  852. data/dist/ice/slice/Ice/PropertiesF.ice +0 -32
  853. data/dist/ice/slice/Ice/RouterF.ice +0 -31
  854. data/dist/ice/slice/Ice/ServantLocator.ice +0 -136
  855. data/dist/ice/slice/Ice/ServantLocatorF.ice +0 -31
  856. data/dist/ice/slice/Ice/ValueFactory.ice +0 -133
  857. data/dist/ice/slice/IceBox/IceBox.ice +0 -216
  858. data/dist/ice/slice/IceGrid/PluginFacade.ice +0 -329
  859. data/dist/ice/slice/IcePatch2/FileInfo.ice +0 -85
  860. data/dist/ice/slice/IcePatch2/FileServer.ice +0 -191
  861. data/dist/lib/Glacier2/PermissionsVerifierF.rb +0 -30
  862. data/dist/lib/Glacier2/RouterF.rb +0 -25
  863. data/dist/lib/Ice/Communicator.rb +0 -87
  864. data/dist/lib/Ice/CommunicatorF.rb +0 -24
  865. data/dist/lib/Ice/Connection.rb +0 -413
  866. data/dist/lib/Ice/ConnectionF.rb +0 -32
  867. data/dist/lib/Ice/Current.rb +0 -141
  868. data/dist/lib/Ice/Endpoint.rb +0 -187
  869. data/dist/lib/Ice/EndpointF.rb +0 -48
  870. data/dist/lib/Ice/FacetMap.rb +0 -24
  871. data/dist/lib/Ice/ImplicitContext.rb +0 -26
  872. data/dist/lib/Ice/ImplicitContextF.rb +0 -24
  873. data/dist/lib/Ice/Instrumentation.rb +0 -169
  874. data/dist/lib/Ice/InstrumentationF.rb +0 -31
  875. data/dist/lib/Ice/LocalException.rb +0 -1031
  876. data/dist/lib/Ice/LocatorF.rb +0 -30
  877. data/dist/lib/Ice/Logger.rb +0 -24
  878. data/dist/lib/Ice/LoggerF.rb +0 -24
  879. data/dist/lib/Ice/ObjectAdapter.rb +0 -29
  880. data/dist/lib/Ice/ObjectAdapterF.rb +0 -24
  881. data/dist/lib/Ice/ObjectFactory.rb +0 -24
  882. data/dist/lib/Ice/Plugin.rb +0 -30
  883. data/dist/lib/Ice/PluginF.rb +0 -28
  884. data/dist/lib/Ice/ProcessF.rb +0 -25
  885. data/dist/lib/Ice/Properties.rb +0 -25
  886. data/dist/lib/Ice/PropertiesF.rb +0 -29
  887. data/dist/lib/Ice/RouterF.rb +0 -25
  888. data/dist/lib/Ice/ServantLocator.rb +0 -26
  889. data/dist/lib/Ice/ServantLocatorF.rb +0 -24
  890. data/dist/lib/Ice/ValueFactory.rb +0 -28
  891. data/dist/lib/IceBox/IceBox.rb +0 -164
  892. data/dist/lib/IceGrid/PluginFacade.rb +0 -35
  893. data/dist/lib/IcePatch2/FileInfo.rb +0 -115
  894. data/dist/lib/IcePatch2/FileServer.rb +0 -123
  895. data/dist/lib/IcePatch2.rb +0 -5
@@ -1,20 +1,18 @@
1
- //
2
- // Copyright (c) ZeroC, Inc. All rights reserved.
3
- //
4
-
5
- #include <Ice/ThreadPool.h>
6
- #include <Ice/EventHandler.h>
7
- #include <Ice/Network.h>
8
- #include <Ice/LocalException.h>
9
- #include <Ice/Instance.h>
10
- #include <Ice/LoggerUtil.h>
11
- #include <Ice/Protocol.h>
12
- #include <Ice/ObjectAdapterFactory.h>
13
- #include <Ice/Properties.h>
14
- #include <Ice/TraceLevels.h>
1
+ // Copyright (c) ZeroC, Inc.
2
+
3
+ #include "ThreadPool.h"
4
+ #include "EventHandler.h"
5
+ #include "Ice/LocalExceptions.h"
6
+ #include "Ice/LoggerUtil.h"
7
+ #include "Ice/Properties.h"
8
+ #include "Instance.h"
9
+ #include "Network.h"
10
+ #include "ObjectAdapterFactory.h"
11
+ #include "PropertyUtil.h"
12
+ #include "TraceLevels.h"
15
13
 
16
14
  #if defined(__FreeBSD__)
17
- # include <sys/sysctl.h>
15
+ # include <sys/sysctl.h>
18
16
  #endif
19
17
 
20
18
  using namespace std;
@@ -22,147 +20,18 @@ using namespace Ice;
22
20
  using namespace Ice::Instrumentation;
23
21
  using namespace IceInternal;
24
22
 
25
- ICE_API IceUtil::Shared* IceInternal::upCast(ThreadPool* p) { return p; }
26
-
27
23
  namespace
28
24
  {
29
-
30
- class ShutdownWorkItem : public ThreadPoolWorkItem
31
- {
32
- public:
33
-
34
- ShutdownWorkItem(const InstancePtr& instance) : _instance(instance)
35
- {
36
- }
37
-
38
- virtual void
39
- execute(ThreadPoolCurrent& current)
40
- {
41
- current.ioCompleted();
42
- try
43
- {
44
- _instance->objectAdapterFactory()->shutdown();
45
- }
46
- catch(const CommunicatorDestroyedException&)
47
- {
48
- }
49
- }
50
-
51
- private:
52
-
53
- const InstancePtr _instance;
54
- };
55
-
56
- class FinishedWorkItem : public ThreadPoolWorkItem
57
- {
58
- public:
59
-
60
- FinishedWorkItem(const EventHandlerPtr& handler, bool close) : _handler(handler), _close(close)
61
- {
62
- }
63
-
64
- virtual void
65
- execute(ThreadPoolCurrent& current)
66
- {
67
- _handler->finished(current, _close);
68
-
69
- //
70
- // Break cyclic reference count.
71
- //
72
- if(_handler->getNativeInfo())
73
- {
74
- _handler->getNativeInfo()->setReadyCallback(0);
75
- }
76
- }
77
-
78
- private:
79
-
80
- const EventHandlerPtr _handler;
81
- const bool _close;
82
- };
83
-
84
- class JoinThreadWorkItem : public ThreadPoolWorkItem
85
- {
86
- public:
87
-
88
- JoinThreadWorkItem(const IceUtil::ThreadPtr& thread) : _thread(thread)
89
- {
90
- }
91
-
92
- virtual void
93
- execute(ThreadPoolCurrent&)
94
- {
95
- // No call to ioCompleted, this shouldn't block (and we don't want to cause
96
- // a new thread to be started).
97
- _thread->getThreadControl().join();
98
- }
99
-
100
- private:
101
-
102
- IceUtil::ThreadPtr _thread;
103
- };
104
-
105
- //
106
- // Exception raised by the thread pool work queue when the thread pool
107
- // is destroyed.
108
- //
109
- class ThreadPoolDestroyedException
110
- {
111
- };
112
-
113
- #ifdef ICE_SWIFT
114
- string
115
- prefixToDispatchQueueLabel(const std::string& prefix)
116
- {
117
- if(prefix == "Ice.ThreadPool.Client")
118
- {
119
- return "com.zeroc.ice.client";
120
- }
121
-
122
- if(prefix == "Ice.ThreadPool.Server")
123
- {
124
- return "com.zeroc.ice.server";
125
- }
126
-
127
- string::size_type end = prefix.find_last_of(".ThreadPool");
128
- if(end == string::npos)
25
+ //
26
+ // Exception raised by the thread pool work queue when the thread pool
27
+ // is destroyed.
28
+ //
29
+ class ThreadPoolDestroyedException
129
30
  {
130
- end = prefix.size();
131
- }
132
-
133
- return "com.zeroc.ice.oa." + prefix.substr(0, end);
134
- }
135
- #endif
136
- }
137
-
138
- Ice::DispatcherCall::~DispatcherCall()
139
- {
140
- // Out of line to avoid weak vtable
141
- }
142
-
143
- Ice::Dispatcher::~Dispatcher()
144
- {
145
- // Out of line to avoid weak vtable
146
- }
147
-
148
- IceInternal::DispatchWorkItem::DispatchWorkItem()
149
- {
150
- }
151
-
152
- IceInternal::DispatchWorkItem::DispatchWorkItem(const Ice::ConnectionPtr& connection) : _connection(connection)
153
- {
154
- }
155
-
156
- void
157
- IceInternal::DispatchWorkItem::execute(ThreadPoolCurrent& current)
158
- {
159
- current.ioCompleted(); // Promote follower
160
- current.dispatchFromThisThread(this);
31
+ };
161
32
  }
162
33
 
163
- IceInternal::ThreadPoolWorkQueue::ThreadPoolWorkQueue(ThreadPool& threadPool) :
164
- _threadPool(threadPool),
165
- _destroyed(false)
34
+ IceInternal::ThreadPoolWorkQueue::ThreadPoolWorkQueue(ThreadPool& threadPool) : _threadPool(threadPool)
166
35
  {
167
36
  _registered = SocketOperationRead;
168
37
  }
@@ -170,7 +39,7 @@ IceInternal::ThreadPoolWorkQueue::ThreadPoolWorkQueue(ThreadPool& threadPool) :
170
39
  void
171
40
  IceInternal::ThreadPoolWorkQueue::destroy()
172
41
  {
173
- //Lock sync(*this); Called with the thread pool locked
42
+ // lock_guard lock(_mutex); Called with the thread pool locked
174
43
  assert(!_destroyed);
175
44
  _destroyed = true;
176
45
  #if defined(ICE_USE_IOCP)
@@ -181,14 +50,14 @@ IceInternal::ThreadPoolWorkQueue::destroy()
181
50
  }
182
51
 
183
52
  void
184
- IceInternal::ThreadPoolWorkQueue::queue(const ThreadPoolWorkItemPtr& item)
53
+ IceInternal::ThreadPoolWorkQueue::queue(function<void(ThreadPoolCurrent&)> item)
185
54
  {
186
- //Lock sync(*this); Called with the thread pool locked
187
- _workItems.push_back(item);
55
+ // lock_guard lock(_mutex); Called with the thread pool locked
56
+ _workItems.push_back(std::move(item));
188
57
  #if defined(ICE_USE_IOCP)
189
58
  _threadPool._selector.completed(this, SocketOperationRead);
190
59
  #else
191
- if(_workItems.size() == 1)
60
+ if (_workItems.size() == 1)
192
61
  {
193
62
  _threadPool._selector.ready(this, SocketOperationRead, true);
194
63
  }
@@ -214,12 +83,12 @@ IceInternal::ThreadPoolWorkQueue::finishAsync(SocketOperation)
214
83
  void
215
84
  IceInternal::ThreadPoolWorkQueue::message(ThreadPoolCurrent& current)
216
85
  {
217
- ThreadPoolWorkItemPtr workItem;
86
+ function<void(ThreadPoolCurrent&)> workItem;
218
87
  {
219
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_threadPool);
220
- if(!_workItems.empty())
88
+ lock_guard lock(_threadPool._mutex);
89
+ if (!_workItems.empty())
221
90
  {
222
- workItem = _workItems.front();
91
+ workItem = std::move(_workItems.front());
223
92
  _workItems.pop_front();
224
93
  }
225
94
  #if defined(ICE_USE_IOCP)
@@ -229,16 +98,16 @@ IceInternal::ThreadPoolWorkQueue::message(ThreadPoolCurrent& current)
229
98
  _threadPool._selector.completed(this, SocketOperationRead);
230
99
  }
231
100
  #else
232
- if(_workItems.empty() && !_destroyed)
101
+ if (_workItems.empty() && !_destroyed)
233
102
  {
234
103
  _threadPool._selector.ready(this, SocketOperationRead, false);
235
104
  }
236
105
  #endif
237
106
  }
238
107
 
239
- if(workItem)
108
+ if (workItem)
240
109
  {
241
- workItem->execute(current);
110
+ workItem(current);
242
111
  }
243
112
  else
244
113
  {
@@ -263,37 +132,38 @@ IceInternal::ThreadPoolWorkQueue::toString() const
263
132
  NativeInfoPtr
264
133
  IceInternal::ThreadPoolWorkQueue::getNativeInfo()
265
134
  {
266
- return 0;
135
+ return nullptr;
267
136
  }
268
137
 
269
- IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& prefix, int timeout) :
270
- _instance(instance),
271
- #ifdef ICE_SWIFT
272
- _dispatchQueue(dispatch_queue_create(prefixToDispatchQueueLabel(prefix).c_str(),
273
- DISPATCH_QUEUE_CONCURRENT_WITH_AUTORELEASE_POOL)),
274
- #else
275
- _dispatcher(_instance->initializationData().dispatcher),
276
- #endif
277
- _destroyed(false),
278
- _prefix(prefix),
279
- _selector(instance),
280
- _nextThreadId(0),
281
- _size(0),
282
- _sizeIO(0),
283
- _sizeMax(0),
284
- _sizeWarn(0),
285
- _serialize(_instance->initializationData().properties->getPropertyAsInt(_prefix + ".Serialize") > 0),
286
- _hasPriority(false),
287
- _priority(0),
288
- _serverIdleTime(timeout),
289
- _threadIdleTime(0),
290
- _stackSize(0),
291
- _inUse(0),
138
+ ThreadPoolPtr
139
+ IceInternal::ThreadPool::create(const InstancePtr& instance, const string& prefix, int timeout)
140
+ {
141
+ auto threadPool = std::shared_ptr<ThreadPool>(new ThreadPool(instance, prefix, timeout));
142
+ threadPool->initialize();
143
+ return threadPool;
144
+ }
145
+
146
+ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, string prefix, int timeout)
147
+ : _instance(instance),
148
+ _executor(_instance->initializationData().executor),
149
+ _prefix(std::move(prefix)),
150
+ _selector(instance),
151
+ _serialize(_instance->initializationData().properties->getPropertyAsInt(_prefix + ".Serialize") > 0),
152
+ _serverIdleTime(timeout)
292
153
  #if !defined(ICE_USE_IOCP)
293
- _inUseIO(0),
294
- _nextHandler(_handlers.end()),
154
+ ,
155
+ _nextHandler(_handlers.end())
295
156
  #endif
296
- _promote(true)
157
+ {
158
+ // Check for unknown thread pool properties
159
+ validatePropertiesWithPrefix(
160
+ _prefix,
161
+ _instance->initializationData().properties,
162
+ &IceInternal::PropertyNames::ThreadPoolProps);
163
+ }
164
+
165
+ void
166
+ IceInternal::ThreadPool::initialize()
297
167
  {
298
168
  PropertiesPtr properties = _instance->initializationData().properties;
299
169
  #ifdef _WIN32
@@ -301,28 +171,23 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
301
171
  GetSystemInfo(&sysInfo);
302
172
  int nProcessors = sysInfo.dwNumberOfProcessors;
303
173
  #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
304
- static int ncpu[2] = { CTL_HW, HW_NCPU };
174
+ static int ncpu[2] = {CTL_HW, HW_NCPU};
305
175
  int nProcessors;
306
176
  size_t sz = sizeof(nProcessors);
307
- if(sysctl(ncpu, 2, &nProcessors, &sz, 0, 0) == -1)
177
+ if (sysctl(ncpu, 2, &nProcessors, &sz, 0, 0) == -1)
308
178
  {
309
179
  nProcessors = 1;
310
180
  }
311
181
  #else
312
182
  int nProcessors = static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
313
- if(nProcessors == -1)
183
+ if (nProcessors == -1)
314
184
  {
315
185
  nProcessors = 1;
316
186
  }
317
187
  #endif
318
188
 
319
- //
320
- // We use just one thread as the default. This is the fastest
321
- // possible setting, still allows one level of nesting, and
322
- // doesn't require to make the servants thread safe.
323
- //
324
189
  int size = properties->getPropertyAsIntWithDefault(_prefix + ".Size", 1);
325
- if(size < 1)
190
+ if (size < 1)
326
191
  {
327
192
  Warning out(_instance->initializationData().logger);
328
193
  out << _prefix << ".Size < 1; Size adjusted to 1";
@@ -330,12 +195,12 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
330
195
  }
331
196
 
332
197
  int sizeMax = properties->getPropertyAsIntWithDefault(_prefix + ".SizeMax", size);
333
- if(sizeMax == -1)
198
+ if (sizeMax == -1)
334
199
  {
335
200
  sizeMax = nProcessors;
336
201
  }
337
202
 
338
- if(sizeMax < size)
203
+ if (sizeMax < size)
339
204
  {
340
205
  Warning out(_instance->initializationData().logger);
341
206
  out << _prefix << ".SizeMax < " << _prefix << ".Size; SizeMax adjusted to Size (" << size << ")";
@@ -343,13 +208,13 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
343
208
  }
344
209
 
345
210
  int sizeWarn = properties->getPropertyAsInt(_prefix + ".SizeWarn");
346
- if(sizeWarn != 0 && sizeWarn < size)
211
+ if (sizeWarn != 0 && sizeWarn < size)
347
212
  {
348
213
  Warning out(_instance->initializationData().logger);
349
214
  out << _prefix << ".SizeWarn < " << _prefix << ".Size; adjusted SizeWarn to Size (" << size << ")";
350
215
  sizeWarn = size;
351
216
  }
352
- else if(sizeWarn > sizeMax)
217
+ else if (sizeWarn > sizeMax)
353
218
  {
354
219
  Warning out(_instance->initializationData().logger);
355
220
  out << _prefix << ".SizeWarn > " << _prefix << ".SizeMax; adjusted SizeWarn to SizeMax (" << sizeMax << ")";
@@ -357,7 +222,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
357
222
  }
358
223
 
359
224
  int threadIdleTime = properties->getPropertyAsIntWithDefault(_prefix + ".ThreadIdleTime", 60);
360
- if(threadIdleTime < 0)
225
+ if (threadIdleTime < 0)
361
226
  {
362
227
  Warning out(_instance->initializationData().logger);
363
228
  out << _prefix << ".ThreadIdleTime < 0; ThreadIdleTime adjusted to 0";
@@ -374,92 +239,45 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
374
239
  _selector.setup(_sizeIO);
375
240
  #endif
376
241
 
377
- #if defined(__APPLE__)
378
- //
379
- // We use a default stack size of 1MB on macOS and the new C++11 mapping to allow transmitting
380
- // class graphs with a depth of 100 (maximum default), 512KB is not enough otherwise.
381
- //
382
- int defaultStackSize = 1024 * 1024; // 1MB
383
- #else
384
- int defaultStackSize = 0;
385
- #endif
386
- int stackSize = properties->getPropertyAsIntWithDefault(_prefix + ".StackSize", defaultStackSize);
387
- if(stackSize < 0)
388
- {
389
- Warning out(_instance->initializationData().logger);
390
- out << _prefix << ".StackSize < 0; Size adjusted to OS default";
391
- stackSize = 0;
392
- }
393
- const_cast<size_t&>(_stackSize) = static_cast<size_t>(stackSize);
394
-
395
- const_cast<bool&>(_hasPriority) = properties->getProperty(_prefix + ".ThreadPriority") != "";
396
- const_cast<int&>(_priority) = properties->getPropertyAsInt(_prefix + ".ThreadPriority");
397
- if(!_hasPriority)
398
- {
399
- const_cast<bool&>(_hasPriority) = properties->getProperty("Ice.ThreadPriority") != "";
400
- const_cast<int&>(_priority) = properties->getPropertyAsInt("Ice.ThreadPriority");
401
- }
402
-
403
- _workQueue = ICE_MAKE_SHARED(ThreadPoolWorkQueue, *this);
242
+ _workQueue = make_shared<ThreadPoolWorkQueue>(*this);
404
243
  _selector.initialize(_workQueue.get());
405
244
 
406
- if(_instance->traceLevels()->threadPool >= 1)
245
+ if (_instance->traceLevels()->threadPool >= 1)
407
246
  {
408
247
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->threadPoolCat);
409
- out << "creating " << _prefix << ": Size = " << _size << ", SizeMax = " << _sizeMax << ", SizeWarn = "
410
- << _sizeWarn;
248
+ out << "creating " << _prefix << ": Size = " << _size << ", SizeMax = " << _sizeMax
249
+ << ", SizeWarn = " << _sizeWarn;
411
250
  }
412
251
 
413
- __setNoDelete(true);
414
252
  try
415
253
  {
416
- for(int i = 0 ; i < _size ; ++i)
254
+ for (int i = 0; i < _size; ++i)
417
255
  {
418
- EventHandlerThreadPtr thread = new EventHandlerThread(this, nextThreadId());
419
- if(_hasPriority)
420
- {
421
- thread->start(_stackSize, _priority);
422
- }
423
- else
424
- {
425
- thread->start(_stackSize);
426
- }
427
- _threads.insert(thread);
256
+ auto thread = make_shared<EventHandlerThread>(shared_from_this(), nextThreadId());
257
+ thread->start();
258
+ _threads.insert(std::move(thread));
428
259
  }
429
260
  }
430
- catch(const IceUtil::Exception& ex)
261
+ catch (const Ice::Exception& ex)
431
262
  {
432
263
  {
433
264
  Error out(_instance->initializationData().logger);
434
- out << "cannot create thread for `" << _prefix << "':\n" << ex;
265
+ out << "cannot create thread for '" << _prefix << "':\n" << ex;
435
266
  }
436
267
 
437
268
  destroy();
438
269
  joinWithAllThreads();
439
- __setNoDelete(false);
440
- throw;
441
- }
442
- catch(...)
443
- {
444
- __setNoDelete(false);
445
270
  throw;
446
271
  }
447
- __setNoDelete(false);
448
272
  }
449
273
 
450
- IceInternal::ThreadPool::~ThreadPool()
451
- {
452
- assert(_destroyed);
453
- #ifdef ICE_SWIFT
454
- dispatch_release(_dispatchQueue);
455
- #endif
456
- }
274
+ IceInternal::ThreadPool::~ThreadPool() { assert(_destroyed); }
457
275
 
458
276
  void
459
277
  IceInternal::ThreadPool::destroy()
460
278
  {
461
- Lock sync(*this);
462
- if(_destroyed)
279
+ lock_guard lock(_mutex);
280
+ if (_destroyed)
463
281
  {
464
282
  return;
465
283
  }
@@ -470,56 +288,51 @@ IceInternal::ThreadPool::destroy()
470
288
  void
471
289
  IceInternal::ThreadPool::updateObservers()
472
290
  {
473
- Lock sync(*this);
474
- for(set<EventHandlerThreadPtr>::iterator p = _threads.begin(); p != _threads.end(); ++p)
291
+ lock_guard lock(_mutex);
292
+ for (const auto& p : _threads)
475
293
  {
476
- (*p)->updateObserver();
294
+ p->updateObserver();
477
295
  }
478
296
  }
479
297
 
480
298
  void
481
299
  IceInternal::ThreadPool::initialize(const EventHandlerPtr& handler)
482
300
  {
483
- Lock sync(*this);
301
+ lock_guard lock(_mutex);
484
302
  assert(!_destroyed);
485
303
  _selector.initialize(handler.get());
486
304
 
487
- class ReadyCallbackI : public ReadyCallback
305
+ class ReadyCallbackI final : public ReadyCallback
488
306
  {
489
307
  public:
490
-
491
- ReadyCallbackI(const ThreadPoolPtr& threadPool, const EventHandlerPtr& handler) :
492
- _threadPool(threadPool), _handler(handler)
308
+ ReadyCallbackI(ThreadPoolPtr threadPool, EventHandlerPtr handler)
309
+ : _threadPool(std::move(threadPool)),
310
+ _handler(std::move(handler))
493
311
  {
494
312
  }
495
313
 
496
- virtual void
497
- ready(SocketOperation op, bool value)
498
- {
499
- _threadPool->ready(_handler, op, value);
500
- }
314
+ void ready(SocketOperation op, bool value) final { _threadPool->ready(_handler, op, value); }
501
315
 
502
316
  private:
503
-
504
317
  const ThreadPoolPtr _threadPool;
505
318
  const EventHandlerPtr _handler;
506
319
  };
507
- handler->getNativeInfo()->setReadyCallback(new ReadyCallbackI(this, handler));
320
+ handler->getNativeInfo()->setReadyCallback(make_shared<ReadyCallbackI>(shared_from_this(), handler));
508
321
  }
509
322
 
510
323
  void
511
324
  IceInternal::ThreadPool::update(const EventHandlerPtr& handler, SocketOperation remove, SocketOperation add)
512
325
  {
513
- Lock sync(*this);
326
+ lock_guard lock(_mutex);
514
327
  assert(!_destroyed);
515
328
 
516
329
  // Don't remove what needs to be added
517
330
  remove = static_cast<SocketOperation>(remove & ~add);
518
331
 
519
332
  // Don't remove/add if already un-registered or registered
520
- remove = static_cast<SocketOperation>(handler->_registered & remove);
521
- add = static_cast<SocketOperation>(~handler->_registered & add);
522
- if(remove == add)
333
+ remove = static_cast<SocketOperation>(handler->_registered & remove);
334
+ add = static_cast<SocketOperation>(~handler->_registered & add);
335
+ if (remove == add)
523
336
  {
524
337
  return;
525
338
  }
@@ -530,19 +343,43 @@ IceInternal::ThreadPool::update(const EventHandlerPtr& handler, SocketOperation
530
343
  bool
531
344
  IceInternal::ThreadPool::finish(const EventHandlerPtr& handler, bool closeNow)
532
345
  {
533
- Lock sync(*this);
346
+ lock_guard lock(_mutex);
534
347
  assert(!_destroyed);
535
348
  #if !defined(ICE_USE_IOCP)
536
349
  closeNow = _selector.finish(handler.get(), closeNow); // This must be called before!
537
- _workQueue->queue(new FinishedWorkItem(handler, !closeNow));
350
+ _workQueue->queue(
351
+ [handler, closeNow](ThreadPoolCurrent& current)
352
+ {
353
+ handler->finished(current, !closeNow);
354
+
355
+ //
356
+ // Break cyclic reference count.
357
+ //
358
+ if (handler->getNativeInfo())
359
+ {
360
+ handler->getNativeInfo()->setReadyCallback(nullptr);
361
+ }
362
+ });
538
363
  return closeNow;
539
364
  #else
540
365
  UNREFERENCED_PARAMETER(closeNow);
541
366
 
542
367
  // If there are no pending asynchronous operations, we can call finish on the handler now.
543
- if(!handler->_pending)
368
+ if (!handler->_pending)
544
369
  {
545
- _workQueue->queue(new FinishedWorkItem(handler, false));
370
+ _workQueue->queue(
371
+ [handler](ThreadPoolCurrent& current)
372
+ {
373
+ handler->finished(current, false);
374
+
375
+ //
376
+ // Break cyclic reference count.
377
+ //
378
+ if (handler->getNativeInfo())
379
+ {
380
+ handler->getNativeInfo()->setReadyCallback(nullptr);
381
+ }
382
+ });
546
383
  _selector.finish(handler.get());
547
384
  }
548
385
  else
@@ -556,8 +393,8 @@ IceInternal::ThreadPool::finish(const EventHandlerPtr& handler, bool closeNow)
556
393
  void
557
394
  IceInternal::ThreadPool::ready(const EventHandlerPtr& handler, SocketOperation op, bool value)
558
395
  {
559
- Lock sync(*this);
560
- if(_destroyed)
396
+ lock_guard lock(_mutex);
397
+ if (_destroyed)
561
398
  {
562
399
  return;
563
400
  }
@@ -565,61 +402,52 @@ IceInternal::ThreadPool::ready(const EventHandlerPtr& handler, SocketOperation o
565
402
  }
566
403
 
567
404
  void
568
- IceInternal::ThreadPool::dispatchFromThisThread(const DispatchWorkItemPtr& workItem)
405
+ IceInternal::ThreadPool::executeFromThisThread(function<void()> call, const Ice::ConnectionPtr& connection)
569
406
  {
570
- #ifdef ICE_SWIFT
571
- dispatch_sync(_dispatchQueue, ^
572
- {
573
- workItem->run();
574
- });
575
- #else
576
- if(_dispatcher)
407
+ if (_executor)
577
408
  {
578
409
  try
579
410
  {
580
- #ifdef ICE_CPP11_MAPPING
581
- _dispatcher([workItem]()
582
- {
583
- workItem->run();
584
- },
585
- workItem->getConnection());
586
- #else
587
- _dispatcher->dispatch(workItem, workItem->getConnection());
588
- #endif
411
+ _executor(std::move(call), connection);
589
412
  }
590
- catch(const std::exception& ex)
413
+ catch (const std::exception& ex)
591
414
  {
592
- if(_instance->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1)
415
+ if (_instance->initializationData().properties->getIcePropertyAsInt("Ice.Warn.Executor") > 1)
593
416
  {
594
417
  Warning out(_instance->initializationData().logger);
595
- out << "dispatch exception:\n" << ex;
418
+ out << "executor exception:\n" << ex;
596
419
  }
597
420
  }
598
- catch(...)
421
+ catch (...)
599
422
  {
600
- if(_instance->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1)
423
+ if (_instance->initializationData().properties->getIcePropertyAsInt("Ice.Warn.Executor") > 1)
601
424
  {
602
425
  Warning out(_instance->initializationData().logger);
603
- out << "dispatch exception:\nunknown c++ exception";
426
+ out << "executor exception: unknown c++ exception";
604
427
  }
605
428
  }
606
429
  }
607
430
  else
608
431
  {
609
- workItem->run();
432
+ call();
610
433
  }
611
- #endif
612
434
  }
613
435
 
614
436
  void
615
- IceInternal::ThreadPool::dispatch(const DispatchWorkItemPtr& workItem)
437
+ IceInternal::ThreadPool::execute(function<void()> call, const Ice::ConnectionPtr& connection)
616
438
  {
617
- Lock sync(*this);
618
- if(_destroyed)
439
+ lock_guard lock(_mutex);
440
+ if (_destroyed)
619
441
  {
620
442
  throw CommunicatorDestroyedException(__FILE__, __LINE__);
621
443
  }
622
- _workQueue->queue(workItem);
444
+
445
+ _workQueue->queue(
446
+ [self = shared_from_this(), call = std::move(call), connection](ThreadPoolCurrent& current)
447
+ {
448
+ current.ioCompleted(); // Promote new leader
449
+ self->executeFromThisThread(call, connection);
450
+ });
623
451
  }
624
452
 
625
453
  void
@@ -633,9 +461,9 @@ IceInternal::ThreadPool::joinWithAllThreads()
633
461
  // wouldn't be possible here anyway, because otherwise the other
634
462
  // threads would never terminate.)
635
463
  //
636
- for(set<EventHandlerThreadPtr>::iterator p = _threads.begin(); p != _threads.end(); ++p)
464
+ for (const auto& thread : _threads)
637
465
  {
638
- (*p)->getThreadControl().join();
466
+ thread->join();
639
467
  }
640
468
  _selector.destroy();
641
469
  }
@@ -646,84 +474,75 @@ IceInternal::ThreadPool::prefix() const
646
474
  return _prefix;
647
475
  }
648
476
 
649
- #ifdef ICE_SWIFT
650
-
651
- dispatch_queue_t
652
- IceInternal::ThreadPool::getDispatchQueue() const ICE_NOEXCEPT
653
- {
654
- return _dispatchQueue;
655
- }
656
-
657
- #endif
658
-
659
477
  void
660
478
  IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
661
479
  {
662
480
  #if !defined(ICE_USE_IOCP)
663
- ThreadPoolCurrent current(_instance, this, thread);
481
+ ThreadPoolCurrent current(shared_from_this(), thread);
664
482
  bool select = false;
665
- while(true)
483
+ while (true)
666
484
  {
667
- if(current._handler)
485
+ if (current._handler)
668
486
  {
669
487
  try
670
488
  {
671
489
  current._handler->message(current);
672
490
  }
673
- catch(const ThreadPoolDestroyedException&)
491
+ catch (const ThreadPoolDestroyedException&)
674
492
  {
675
- Lock sync(*this);
493
+ lock_guard lock(_mutex);
676
494
  --_inUse;
677
- thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
495
+ thread->setState(ThreadState::ThreadStateIdle);
678
496
  return;
679
497
  }
680
- catch(const exception& ex)
498
+ catch (const exception& ex)
681
499
  {
682
500
  Error out(_instance->initializationData().logger);
683
- out << "exception in `" << _prefix << "':\n" << ex << "\nevent handler: "
684
- << current._handler->toString();
501
+ out << "exception in '" << _prefix << "':\n"
502
+ << ex << "\nevent handler: " << current._handler->toString();
685
503
  }
686
- catch(...)
504
+ catch (...)
687
505
  {
688
506
  Error out(_instance->initializationData().logger);
689
- out << "exception in `" << _prefix << "':\nevent handler: " << current._handler->toString();
507
+ out << "exception in '" << _prefix << "':\nevent handler: " << current._handler->toString();
690
508
  }
691
509
  }
692
- else if(select)
510
+ else if (select)
693
511
  {
694
512
  try
695
513
  {
696
514
  _selector.select(_serverIdleTime);
697
515
  }
698
- catch(const SelectorTimeoutException&)
516
+ catch (const SelectorTimeoutException&)
699
517
  {
700
- Lock sync(*this);
701
- if(!_destroyed && _inUse == 0)
518
+ lock_guard lock(_mutex);
519
+ if (!_destroyed && _inUse == 0)
702
520
  {
703
- _workQueue->queue(new ShutdownWorkItem(_instance)); // Select timed-out.
521
+ _workQueue->queue([instance = _instance](ThreadPoolCurrent& shutdownCurrent)
522
+ { shutdown(shutdownCurrent, instance); });
704
523
  }
705
524
  continue;
706
525
  }
707
526
  }
708
527
 
709
528
  {
710
- Lock sync(*this);
711
- if(!current._handler)
529
+ unique_lock lock(_mutex);
530
+ if (!current._handler)
712
531
  {
713
- if(select)
532
+ if (select)
714
533
  {
715
534
  _selector.finishSelect(_handlers);
716
535
  _nextHandler = _handlers.begin();
717
536
  select = false;
718
537
  }
719
- else if(!current._leader && followerWait(current))
538
+ else if (!current._leader && followerWait(current, lock))
720
539
  {
721
540
  return; // Wait timed-out.
722
541
  }
723
542
  }
724
- else if(_sizeMax > 1)
543
+ else if (_sizeMax > 1)
725
544
  {
726
- if(!current._ioCompleted)
545
+ if (!current._ioCompleted)
727
546
  {
728
547
  //
729
548
  // The handler didn't call ioCompleted() so we take care of decreasing
@@ -737,7 +556,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
737
556
  // If the handler called ioCompleted(), we re-enable the handler in
738
557
  // case it was disabled and we decrease the number of thread in use.
739
558
  //
740
- if(_serialize && current._handler.get() != _workQueue.get())
559
+ if (_serialize && current._handler.get() != _workQueue.get())
741
560
  {
742
561
  _selector.enable(current._handler.get(), current.operation);
743
562
  }
@@ -745,7 +564,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
745
564
  --_inUse;
746
565
  }
747
566
 
748
- if(!current._leader && followerWait(current))
567
+ if (!current._leader && followerWait(current, lock))
749
568
  {
750
569
  return; // Wait timed-out.
751
570
  }
@@ -754,25 +573,25 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
754
573
  //
755
574
  // Get the next ready handler.
756
575
  //
757
- while(_nextHandler != _handlers.end() &&
758
- !(_nextHandler->second & ~_nextHandler->first->_disabled & _nextHandler->first->_registered))
576
+ while (_nextHandler != _handlers.end() &&
577
+ !(_nextHandler->second & ~_nextHandler->first->_disabled & _nextHandler->first->_registered))
759
578
  {
760
579
  ++_nextHandler;
761
580
  }
762
- if(_nextHandler != _handlers.end())
581
+ if (_nextHandler != _handlers.end())
763
582
  {
764
583
  current._ioCompleted = false;
765
- current._handler = ICE_GET_SHARED_FROM_THIS(_nextHandler->first);
584
+ current._handler = _nextHandler->first->shared_from_this();
766
585
  current.operation = _nextHandler->second;
767
586
  ++_nextHandler;
768
- thread->setState(ICE_ENUM(ThreadState, ThreadStateInUseForIO));
587
+ thread->setState(ThreadState::ThreadStateInUseForIO);
769
588
  }
770
589
  else
771
590
  {
772
- current._handler = 0;
591
+ current._handler = nullptr;
773
592
  }
774
593
 
775
- if(!current._handler)
594
+ if (!current._handler)
776
595
  {
777
596
  //
778
597
  // If there are no more ready handlers and there are still threads busy performing
@@ -780,7 +599,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
780
599
  // select() only once all the IOs are completed). Otherwise, if there are no more
781
600
  // threads performing IOs, it's time to do another select().
782
601
  //
783
- if(_inUseIO > 0)
602
+ if (_inUseIO > 0)
784
603
  {
785
604
  promoteFollower(current);
786
605
  }
@@ -789,17 +608,17 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
789
608
  _handlers.clear();
790
609
  _selector.startSelect();
791
610
  select = true;
792
- thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
611
+ thread->setState(ThreadState::ThreadStateIdle);
793
612
  }
794
613
  }
795
- else if(_sizeMax > 1)
614
+ else if (_sizeMax > 1)
796
615
  {
797
616
  //
798
617
  // Increment the IO thread count and if there are still threads available
799
618
  // to perform IO and more handlers ready, we promote a follower.
800
619
  //
801
620
  ++_inUseIO;
802
- if(_nextHandler != _handlers.end() && _inUseIO < _sizeIO)
621
+ if (_nextHandler != _handlers.end() && _inUseIO < _sizeIO)
803
622
  {
804
623
  promoteFollower(current);
805
624
  }
@@ -807,44 +626,45 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
807
626
  }
808
627
  }
809
628
  #else
810
- ThreadPoolCurrent current(_instance, this, thread);
811
- while(true)
629
+ ThreadPoolCurrent current(shared_from_this(), thread);
630
+ while (true)
812
631
  {
813
632
  try
814
633
  {
815
634
  current._ioCompleted = false;
816
- current._handler = ICE_GET_SHARED_FROM_THIS(_selector.getNextHandler(current.operation, current._count,
817
- current._error, _threadIdleTime));
635
+ current._handler =
636
+ _selector.getNextHandler(current.operation, current._count, current._error, _threadIdleTime)
637
+ ->shared_from_this();
818
638
  }
819
- catch(const SelectorTimeoutException&)
639
+ catch (const SelectorTimeoutException&)
820
640
  {
821
- if(_sizeMax > 1)
641
+ if (_sizeMax > 1)
822
642
  {
823
- Lock sync(*this);
643
+ lock_guard lock(_mutex);
824
644
 
825
- if(_destroyed)
645
+ if (_destroyed)
826
646
  {
827
647
  continue;
828
648
  }
829
- else if(_inUse < static_cast<int>(_threads.size() - 1)) // If not the last idle thread, we can exit.
649
+ else if (_inUse < static_cast<int>(_threads.size() - 1)) // If not the last idle thread, we can exit.
830
650
  {
831
651
  BOOL hasIO = false;
832
652
  GetThreadIOPendingFlag(GetCurrentThread(), &hasIO);
833
- if(hasIO)
653
+ if (hasIO)
834
654
  {
835
655
  continue;
836
656
  }
837
657
 
838
- if(_instance->traceLevels()->threadPool >= 1)
658
+ if (_instance->traceLevels()->threadPool >= 1)
839
659
  {
840
660
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->threadPoolCat);
841
661
  out << "shrinking " << _prefix << ": Size = " << (_threads.size() - 1);
842
662
  }
843
663
  _threads.erase(thread);
844
- _workQueue->queue(new JoinThreadWorkItem(thread));
664
+ _workQueue->queue([thread](ThreadPoolCurrent&) { joinThread(thread); });
845
665
  return;
846
666
  }
847
- else if(_inUse > 0)
667
+ else if (_inUse > 0)
848
668
  {
849
669
  //
850
670
  // If this is the last idle thread but there are still other threads
@@ -858,23 +678,25 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
858
678
 
859
679
  try
860
680
  {
861
- current._handler = ICE_GET_SHARED_FROM_THIS(_selector.getNextHandler(current.operation, current._count,
862
- current._error, _serverIdleTime));
681
+ current._handler =
682
+ _selector.getNextHandler(current.operation, current._count, current._error, _serverIdleTime)
683
+ ->shared_from_this();
863
684
  }
864
- catch(const SelectorTimeoutException&)
685
+ catch (const SelectorTimeoutException&)
865
686
  {
866
- Lock sync(*this);
867
- if(!_destroyed)
687
+ lock_guard lock(_mutex);
688
+ if (!_destroyed)
868
689
  {
869
- _workQueue->queue(new ShutdownWorkItem(_instance));
690
+ _workQueue->queue([instance = _instance](ThreadPoolCurrent& shutdownCurrent)
691
+ { shutdown(shutdownCurrent, instance); });
870
692
  }
871
693
  continue;
872
694
  }
873
695
  }
874
696
 
875
697
  {
876
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
877
- thread->setState(ICE_ENUM(ThreadState, ThreadStateInUseForIO));
698
+ lock_guard lock(_mutex);
699
+ thread->setState(ThreadState::ThreadStateInUseForIO);
878
700
  }
879
701
 
880
702
  try
@@ -882,29 +704,29 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
882
704
  assert(current._handler);
883
705
  current._handler->message(current);
884
706
  }
885
- catch(const ThreadPoolDestroyedException&)
707
+ catch (const ThreadPoolDestroyedException&)
886
708
  {
887
709
  return;
888
710
  }
889
- catch(const exception& ex)
711
+ catch (const exception& ex)
890
712
  {
891
713
  Error out(_instance->initializationData().logger);
892
- out << "exception in `" << _prefix << "':\n" << ex << "\nevent handler: " << current._handler->toString();
714
+ out << "exception in '" << _prefix << "':\n" << ex << "\nevent handler: " << current._handler->toString();
893
715
  }
894
- catch(...)
716
+ catch (...)
895
717
  {
896
718
  Error out(_instance->initializationData().logger);
897
- out << "exception in `" << _prefix << "':\nevent handler: " << current._handler->toString();
719
+ out << "exception in '" << _prefix << "':\nevent handler: " << current._handler->toString();
898
720
  }
899
721
 
900
722
  {
901
- Lock sync(*this);
902
- if(_sizeMax > 1 && current._ioCompleted)
723
+ lock_guard lock(_mutex);
724
+ if (_sizeMax > 1 && current._ioCompleted)
903
725
  {
904
726
  assert(_inUse > 0);
905
727
  --_inUse;
906
728
  }
907
- thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
729
+ thread->setState(ThreadState::ThreadStateIdle);
908
730
  }
909
731
  }
910
732
  #endif
@@ -913,55 +735,56 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread)
913
735
  bool
914
736
  IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current)
915
737
  {
916
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
738
+ lock_guard lock(_mutex);
917
739
 
918
740
  current._ioCompleted = true; // Set the IO completed flag to specify that ioCompleted() has been called.
919
741
 
920
- current._thread->setState(ICE_ENUM(ThreadState, ThreadStateInUseForUser));
742
+ current._thread->setState(ThreadState::ThreadStateInUseForUser);
921
743
 
922
- if(_sizeMax > 1)
744
+ if (_sizeMax > 1)
923
745
  {
924
-
925
746
  #if !defined(ICE_USE_IOCP)
926
747
  --_inUseIO;
927
748
 
928
- if(!_destroyed)
749
+ if (!_destroyed)
929
750
  {
930
- if(_serialize && current._handler.get() != _workQueue.get())
751
+ if (_serialize && current._handler.get() != _workQueue.get())
931
752
  {
932
753
  _selector.disable(current._handler.get(), current.operation);
933
754
  }
934
755
  }
935
756
 
936
- if(current._leader)
757
+ if (current._leader)
937
758
  {
938
759
  //
939
760
  // If this thread is still the leader, it's time to promote a new leader.
940
761
  //
941
762
  promoteFollower(current);
942
763
  }
943
- else if(_promote && (_nextHandler != _handlers.end() || _inUseIO == 0))
764
+ else if (_promote && (_nextHandler != _handlers.end() || _inUseIO == 0))
944
765
  {
945
- notify();
766
+ _conditionVariable.notify_one();
946
767
  }
947
768
  #endif
948
769
 
949
770
  assert(_inUse >= 0);
950
771
  ++_inUse;
951
772
 
952
- if(_inUse == _sizeWarn)
773
+ if (_inUse == _sizeWarn)
953
774
  {
954
775
  Warning out(_instance->initializationData().logger);
955
- out << "thread pool `" << _prefix << "' is running low on threads\n"
956
- << "Size=" << _size << ", " << "SizeMax=" << _sizeMax << ", " << "SizeWarn=" << _sizeWarn;
776
+ out << "thread pool '" << _prefix << "' is running low on threads\n"
777
+ << "Size=" << _size << ", "
778
+ << "SizeMax=" << _sizeMax << ", "
779
+ << "SizeWarn=" << _sizeWarn;
957
780
  }
958
781
 
959
- if(!_destroyed)
782
+ if (!_destroyed)
960
783
  {
961
784
  assert(_inUse <= static_cast<int>(_threads.size()));
962
- if(_inUse < _sizeMax && _inUse == static_cast<int>(_threads.size()))
785
+ if (_inUse < _sizeMax && _inUse == static_cast<int>(_threads.size()))
963
786
  {
964
- if(_instance->traceLevels()->threadPool >= 1)
787
+ if (_instance->traceLevels()->threadPool >= 1)
965
788
  {
966
789
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->threadPoolCat);
967
790
  out << "growing " << _prefix << ": Size=" << _threads.size() + 1;
@@ -969,21 +792,14 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current)
969
792
 
970
793
  try
971
794
  {
972
- EventHandlerThreadPtr thread = new EventHandlerThread(this, nextThreadId());
973
- if(_hasPriority)
974
- {
975
- thread->start(_stackSize, _priority);
976
- }
977
- else
978
- {
979
- thread->start(_stackSize);
980
- }
981
- _threads.insert(thread);
795
+ auto thread = make_shared<EventHandlerThread>(shared_from_this(), nextThreadId());
796
+ thread->start();
797
+ _threads.insert(std::move(thread));
982
798
  }
983
- catch(const IceUtil::Exception& ex)
799
+ catch (const Ice::Exception& ex)
984
800
  {
985
801
  Error out(_instance->initializationData().logger);
986
- out << "cannot create thread for `" << _prefix << "':\n" << ex;
802
+ out << "cannot create thread for '" << _prefix << "':\n" << ex;
987
803
  }
988
804
  }
989
805
  }
@@ -998,7 +814,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
998
814
  {
999
815
  assert(current._handler->_pending & current.operation);
1000
816
 
1001
- if(current._handler->_started & current.operation)
817
+ if (current._handler->_started & current.operation)
1002
818
  {
1003
819
  assert(!(current._handler->_completed & current.operation));
1004
820
  current._handler->_completed = static_cast<SocketOperation>(current._handler->_completed | current.operation);
@@ -1008,33 +824,29 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
1008
824
  info->count = current._count;
1009
825
  info->error = current._error;
1010
826
 
1011
- if(!current._handler->finishAsync(current.operation)) // Returns false if the handler is finished.
827
+ if (!current._handler->finishAsync(current.operation)) // Returns false if the handler is finished.
1012
828
  {
1013
829
  current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
1014
- if(!current._handler->_pending && current._handler->_finish)
830
+ if (!current._handler->_pending && current._handler->_finish)
1015
831
  {
1016
- Lock sync(*this);
1017
- _workQueue->queue(new FinishedWorkItem(current._handler, false));
1018
- _selector.finish(current._handler.get());
832
+ finish(current._handler, false);
1019
833
  }
1020
834
  return false;
1021
835
  }
1022
836
  }
1023
- else if(!(current._handler->_completed & current.operation) && (current._handler->_registered & current.operation))
837
+ else if (!(current._handler->_completed & current.operation) && (current._handler->_registered & current.operation))
1024
838
  {
1025
839
  assert(!(current._handler->_started & current.operation));
1026
- if(current._handler->_ready & current.operation)
840
+ if (current._handler->_ready & current.operation)
1027
841
  {
1028
842
  return true;
1029
843
  }
1030
- else if(!current._handler->startAsync(current.operation))
844
+ else if (!current._handler->startAsync(current.operation))
1031
845
  {
1032
846
  current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
1033
- if(!current._handler->_pending && current._handler->_finish)
847
+ if (!current._handler->_pending && current._handler->_finish)
1034
848
  {
1035
- Lock sync(*this);
1036
- _workQueue->queue(new FinishedWorkItem(current._handler, false));
1037
- _selector.finish(current._handler.get());
849
+ finish(current._handler, false);
1038
850
  }
1039
851
  return false;
1040
852
  }
@@ -1045,7 +857,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
1045
857
  }
1046
858
  }
1047
859
 
1048
- if(current._handler->_registered & current.operation)
860
+ if (current._handler->_registered & current.operation)
1049
861
  {
1050
862
  assert(current._handler->_completed & current.operation);
1051
863
  current._handler->_completed = static_cast<SocketOperation>(current._handler->_completed & ~current.operation);
@@ -1054,11 +866,9 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
1054
866
  else
1055
867
  {
1056
868
  current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
1057
- if(!current._handler->_pending && current._handler->_finish)
869
+ if (!current._handler->_pending && current._handler->_finish)
1058
870
  {
1059
- Lock sync(*this);
1060
- _workQueue->queue(new FinishedWorkItem(current._handler, false));
1061
- _selector.finish(current._handler.get());
871
+ finish(current._handler, false);
1062
872
  }
1063
873
  return false;
1064
874
  }
@@ -1067,14 +877,14 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
1067
877
  void
1068
878
  IceInternal::ThreadPool::finishMessage(ThreadPoolCurrent& current)
1069
879
  {
1070
- if(current._handler->_registered & current.operation && !current._handler->_finish)
880
+ if (current._handler->_registered & current.operation && !current._handler->_finish)
1071
881
  {
1072
882
  assert(!(current._handler->_completed & current.operation));
1073
- if(current._handler->_ready & current.operation)
883
+ if (current._handler->_ready & current.operation)
1074
884
  {
1075
885
  _selector.completed(current._handler.get(), current.operation);
1076
886
  }
1077
- else if(!current._handler->startAsync(current.operation))
887
+ else if (!current._handler->startAsync(current.operation))
1078
888
  {
1079
889
  current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
1080
890
  }
@@ -1089,12 +899,9 @@ IceInternal::ThreadPool::finishMessage(ThreadPoolCurrent& current)
1089
899
  current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
1090
900
  }
1091
901
 
1092
- if(!current._handler->_pending && current._handler->_finish)
902
+ if (!current._handler->_pending && current._handler->_finish)
1093
903
  {
1094
- // There are no more pending async operations, it's time to call finish.
1095
- Lock sync(*this);
1096
- _workQueue->queue(new FinishedWorkItem(current._handler, false));
1097
- _selector.finish(current._handler.get());
904
+ finish(current._handler, false);
1098
905
  }
1099
906
  }
1100
907
  #else
@@ -1103,56 +910,53 @@ IceInternal::ThreadPool::promoteFollower(ThreadPoolCurrent& current)
1103
910
  {
1104
911
  assert(!_promote && current._leader);
1105
912
  _promote = true;
1106
- if(_inUseIO < _sizeIO && (_nextHandler != _handlers.end() || _inUseIO == 0))
913
+ if (_inUseIO < _sizeIO && (_nextHandler != _handlers.end() || _inUseIO == 0))
1107
914
  {
1108
- notify();
915
+ _conditionVariable.notify_one();
1109
916
  }
1110
917
  current._leader = false;
1111
918
  }
1112
919
 
1113
920
  bool
1114
- IceInternal::ThreadPool::followerWait(ThreadPoolCurrent& current)
921
+ IceInternal::ThreadPool::followerWait(ThreadPoolCurrent& current, unique_lock<mutex>& lock)
1115
922
  {
1116
923
  assert(!current._leader);
1117
924
 
1118
- current._thread->setState(ICE_ENUM(ThreadState, ThreadStateIdle));
925
+ current._thread->setState(ThreadState::ThreadStateIdle);
1119
926
 
1120
927
  //
1121
928
  // It's important to clear the handler before waiting to make sure that
1122
- // resources for the handler are released now if it's finished. We also
1123
- // clear the per-thread stream.
929
+ // resources for the handler are released now if it's finished.
1124
930
  //
1125
- current._handler = 0;
1126
- current.stream.clear();
1127
- current.stream.b.clear();
931
+ current._handler = nullptr;
1128
932
 
1129
933
  //
1130
934
  // Wait to be promoted and for all the IO threads to be done.
1131
935
  //
1132
- while(!_promote || _inUseIO == _sizeIO || (_nextHandler == _handlers.end() && _inUseIO > 0))
936
+ while (!_promote || _inUseIO == _sizeIO || (_nextHandler == _handlers.end() && _inUseIO > 0))
1133
937
  {
1134
- if(_threadIdleTime)
938
+ if (_threadIdleTime)
1135
939
  {
1136
- if(!timedWait(IceUtil::Time::seconds(_threadIdleTime)))
940
+ if (_conditionVariable.wait_for(lock, chrono::seconds(_threadIdleTime)) != cv_status::no_timeout)
1137
941
  {
1138
- if(!_destroyed && (!_promote || _inUseIO == _sizeIO ||
1139
- (_nextHandler == _handlers.end() && _inUseIO > 0)))
942
+ if (!_destroyed &&
943
+ (!_promote || _inUseIO == _sizeIO || (_nextHandler == _handlers.end() && _inUseIO > 0)))
1140
944
  {
1141
- if(_instance->traceLevels()->threadPool >= 1)
945
+ if (_instance->traceLevels()->threadPool >= 1)
1142
946
  {
1143
947
  Trace out(_instance->initializationData().logger, _instance->traceLevels()->threadPoolCat);
1144
948
  out << "shrinking " << _prefix << ": Size=" << (_threads.size() - 1);
1145
949
  }
1146
950
  assert(_threads.size() > 1); // Can only be called by a waiting follower thread.
1147
951
  _threads.erase(current._thread);
1148
- _workQueue->queue(new JoinThreadWorkItem(current._thread));
952
+ _workQueue->queue([thread = current._thread](ThreadPoolCurrent&) { joinThread(thread); });
1149
953
  return true;
1150
954
  }
1151
955
  }
1152
956
  }
1153
957
  else
1154
958
  {
1155
- wait();
959
+ _conditionVariable.wait(lock);
1156
960
  }
1157
961
  }
1158
962
  current._leader = true; // The current thread has become the leader.
@@ -1169,10 +973,30 @@ IceInternal::ThreadPool::nextThreadId()
1169
973
  return os.str();
1170
974
  }
1171
975
 
1172
- IceInternal::ThreadPool::EventHandlerThread::EventHandlerThread(const ThreadPoolPtr& pool, const string& name) :
1173
- IceUtil::Thread(name),
1174
- _pool(pool),
1175
- _state(ICE_ENUM(ThreadState, ThreadStateIdle))
976
+ void
977
+ IceInternal::ThreadPool::joinThread(const EventHandlerThreadPtr& thread)
978
+ {
979
+ // No call to ioCompleted, this shouldn't block (and we don't want to cause a new thread to
980
+ // be started).
981
+ thread->join();
982
+ }
983
+
984
+ void
985
+ IceInternal::ThreadPool::shutdown(const ThreadPoolCurrent& current, const InstancePtr& instance)
986
+ {
987
+ current.ioCompleted();
988
+ try
989
+ {
990
+ instance->objectAdapterFactory()->shutdown();
991
+ }
992
+ catch (const CommunicatorDestroyedException&)
993
+ {
994
+ }
995
+ }
996
+
997
+ IceInternal::ThreadPool::EventHandlerThread::EventHandlerThread(ThreadPoolPtr pool, string name)
998
+ : _name(std::move(name)),
999
+ _pool(std::move(pool))
1176
1000
  {
1177
1001
  updateObserver();
1178
1002
  }
@@ -1182,9 +1006,9 @@ IceInternal::ThreadPool::EventHandlerThread::updateObserver()
1182
1006
  {
1183
1007
  // Must be called with the thread pool mutex locked
1184
1008
  const CommunicatorObserverPtr& obsv = _pool->_instance->initializationData().observer;
1185
- if(obsv)
1009
+ if (obsv)
1186
1010
  {
1187
- _observer.attach(obsv->getThreadObserver(_pool->_prefix, name(), _state, _observer.get()));
1011
+ _observer.attach(obsv->getThreadObserver(_pool->_prefix, _name, _state, _observer.get()));
1188
1012
  }
1189
1013
  }
1190
1014
 
@@ -1192,9 +1016,9 @@ void
1192
1016
  IceInternal::ThreadPool::EventHandlerThread::setState(Ice::Instrumentation::ThreadState s)
1193
1017
  {
1194
1018
  // Must be called with the thread pool mutex locked
1195
- if(_observer)
1019
+ if (_observer)
1196
1020
  {
1197
- if(_state != s)
1021
+ if (_state != s)
1198
1022
  {
1199
1023
  _observer->stateChanged(_state, s);
1200
1024
  }
@@ -1202,91 +1026,85 @@ IceInternal::ThreadPool::EventHandlerThread::setState(Ice::Instrumentation::Thre
1202
1026
  _state = s;
1203
1027
  }
1204
1028
 
1029
+ void
1030
+ IceInternal::ThreadPool::EventHandlerThread::start()
1031
+ {
1032
+ assert(!_thread.joinable()); // Not started yet
1033
+ // It is safe to use this pointer here, because the thread pool keeps a reference to all threads and join them
1034
+ // before exiting.
1035
+ _thread = thread(&EventHandlerThread::run, this);
1036
+ }
1037
+
1205
1038
  void
1206
1039
  IceInternal::ThreadPool::EventHandlerThread::run()
1207
1040
  {
1208
- #ifdef ICE_CPP11_MAPPING
1209
- if(_pool->_instance->initializationData().threadStart)
1210
- #else
1211
- if(_pool->_instance->initializationData().threadHook)
1212
- #endif
1041
+ if (_pool->_instance->initializationData().threadStart)
1213
1042
  {
1214
1043
  try
1215
1044
  {
1216
- #ifdef ICE_CPP11_MAPPING
1217
1045
  _pool->_instance->initializationData().threadStart();
1218
- #else
1219
- _pool->_instance->initializationData().threadHook->start();
1220
- #endif
1221
1046
  }
1222
- catch(const exception& ex)
1047
+ catch (const exception& ex)
1223
1048
  {
1224
1049
  Error out(_pool->_instance->initializationData().logger);
1225
- out << "thread hook start() method raised an unexpected exception in `" << _pool->_prefix << "':\n" << ex;
1050
+ out << "thread hook start() method raised an unexpected exception in '" << _pool->_prefix << "':\n" << ex;
1226
1051
  }
1227
- catch(...)
1052
+ catch (...)
1228
1053
  {
1229
1054
  Error out(_pool->_instance->initializationData().logger);
1230
- out << "thread hook start() method raised an unexpected exception in `" << _pool->_prefix << "'";
1055
+ out << "thread hook start() method raised an unexpected exception in '" << _pool->_prefix << "'";
1231
1056
  }
1232
1057
  }
1233
1058
 
1234
1059
  try
1235
1060
  {
1236
- _pool->run(this);
1061
+ _pool->run(shared_from_this());
1237
1062
  }
1238
- catch(const exception& ex)
1063
+ catch (const exception& ex)
1239
1064
  {
1240
1065
  Error out(_pool->_instance->initializationData().logger);
1241
- out << "exception in `" << _pool->_prefix << "':\n" << ex;
1066
+ out << "exception in '" << _pool->_prefix << "':\n" << ex;
1242
1067
  }
1243
- catch(...)
1068
+ catch (...)
1244
1069
  {
1245
1070
  Error out(_pool->_instance->initializationData().logger);
1246
- out << "unknown exception in `" << _pool->_prefix << "'";
1071
+ out << "unknown exception in '" << _pool->_prefix << "'";
1247
1072
  }
1248
1073
 
1249
1074
  _observer.detach();
1250
1075
 
1251
- #ifdef ICE_CPP11_MAPPING
1252
- if(_pool->_instance->initializationData().threadStop)
1253
- #else
1254
- if(_pool->_instance->initializationData().threadHook)
1255
- #endif
1076
+ if (_pool->_instance->initializationData().threadStop)
1256
1077
  {
1257
1078
  try
1258
1079
  {
1259
- #ifdef ICE_CPP11_MAPPING
1260
1080
  _pool->_instance->initializationData().threadStop();
1261
- #else
1262
- _pool->_instance->initializationData().threadHook->stop();
1263
- #endif
1264
1081
  }
1265
- catch(const exception& ex)
1082
+ catch (const exception& ex)
1266
1083
  {
1267
1084
  Error out(_pool->_instance->initializationData().logger);
1268
- out << "thread hook stop() method raised an unexpected exception in `" << _pool->_prefix << "':\n" << ex;
1085
+ out << "thread hook stop() method raised an unexpected exception in '" << _pool->_prefix << "':\n" << ex;
1269
1086
  }
1270
- catch(...)
1087
+ catch (...)
1271
1088
  {
1272
1089
  Error out(_pool->_instance->initializationData().logger);
1273
- out << "thread hook stop() method raised an unexpected exception in `" << _pool->_prefix << "'";
1090
+ out << "thread hook stop() method raised an unexpected exception in '" << _pool->_prefix << "'";
1274
1091
  }
1275
1092
  }
1276
1093
 
1277
- _pool = 0; // Break cyclic dependency.
1094
+ _pool = nullptr; // Break cyclic dependency.
1278
1095
  }
1279
1096
 
1280
- ThreadPoolCurrent::ThreadPoolCurrent(const InstancePtr& instance,
1281
- const ThreadPoolPtr& threadPool,
1282
- const ThreadPool::EventHandlerThreadPtr& thread) :
1283
- operation(SocketOperationNone),
1284
- stream(instance.get(), Ice::currentProtocolEncoding),
1285
- _threadPool(threadPool.get()),
1286
- _thread(thread),
1287
- _ioCompleted(false)
1288
- #if !defined(ICE_USE_IOCP)
1289
- , _leader(false)
1290
- #endif
1097
+ void
1098
+ IceInternal::ThreadPool::EventHandlerThread::join()
1099
+ {
1100
+ if (_thread.joinable())
1101
+ {
1102
+ _thread.join();
1103
+ }
1104
+ }
1105
+
1106
+ ThreadPoolCurrent::ThreadPoolCurrent(const ThreadPoolPtr& threadPool, ThreadPool::EventHandlerThreadPtr thread)
1107
+ : _threadPool(threadPool.get()),
1108
+ _thread(std::move(thread))
1291
1109
  {
1292
1110
  }