rustorb 0.5.0__tar.gz → 0.7.0__tar.gz
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.
- {rustorb-0.5.0 → rustorb-0.7.0}/Cargo.lock +8 -8
- {rustorb-0.5.0 → rustorb-0.7.0}/Cargo.toml +6 -6
- {rustorb-0.5.0 → rustorb-0.7.0}/PKG-INFO +1 -1
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/value.rs +6 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/lib.rs +1 -1
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/object.rs +16 -3
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/servant.rs +1 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/stream.rs +57 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/value.rs +38 -2
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/ami.rs +18 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/pyproject.toml +1 -1
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/timeouts.py +2 -2
- {rustorb-0.5.0 → rustorb-0.7.0}/README.md +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/Cargo.toml +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/LICENSE-APACHE +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/LICENSE-MIT +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/README.md +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/decoder.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/encoder.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/error.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/lib.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/long_double.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/octets.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/traits.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/src/xcdr.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/tests/cdr.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-cdr/tests/xcdr.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/Cargo.toml +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/LICENSE-APACHE +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/LICENSE-MIT +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/README.md +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/benches/throughput.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/codeset.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/connection.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/dii.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/dynany/mod.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/dynany/tests.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/exception.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/fixed.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/idl/abstract_iface.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/idl/mod.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/idl/tests.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/idl/value.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/idle.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/iop.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/name.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/orb.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/pi.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/poa.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/policy.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/pool.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/server.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/sock.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/timeout.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/tls.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/trace.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/typecode/cdr.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/typecode/mod.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/typecode/tests.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/unix.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/src/wire.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/any.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/async_api.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/bidir.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/client.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/connections.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/dii.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/message_size.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/pi.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/poa.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/poa_manager_factory.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/policy.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/server.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/soak.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/stress.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/sync_scope.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/ca.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/client-bundle.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/client.key +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/client.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/make-certs.sh +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/other-ca.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/other-server.key +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/other-server.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/server-bundle.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/server.key +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/server.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/wrong-name.key +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls/wrong-name.pem +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/tls.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/trace.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/unix.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-core/tests/valuetype.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/Cargo.toml +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/LICENSE-APACHE +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/LICENSE-MIT +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/README.md +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/component.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/corbaloc.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/error.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/fragment.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/header.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/iiop.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/ior.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/lib.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/message.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/service_context.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/src/writer.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/tests/giop.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/tests/ior.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-giop/tests/omniorb_golden.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/Cargo.toml +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/LICENSE-APACHE +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/LICENSE-MIT +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/README.md +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/build.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/any.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/dii.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/dynany.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/error.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/lib.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/log.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/orb.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/pi.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/poa.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/tc.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/crates/rustorb-python/src/value.rs +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/BiDirPolicy.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/CORBA.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/DynamicAny.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/IOP.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/Messaging.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/Messaging__POA.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/PortableInterceptor.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/PortableServer.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/PortableServer__POA.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/TimeBase.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/__init__.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/_log.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/_native.pyi +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/_rt.py +0 -0
- {rustorb-0.5.0 → rustorb-0.7.0}/rustorb/_types.py +0 -0
|
@@ -438,11 +438,11 @@ dependencies = [
|
|
|
438
438
|
|
|
439
439
|
[[package]]
|
|
440
440
|
name = "rustorb-cdr"
|
|
441
|
-
version = "0.
|
|
441
|
+
version = "0.7.0"
|
|
442
442
|
|
|
443
443
|
[[package]]
|
|
444
444
|
name = "rustorb-core"
|
|
445
|
-
version = "0.
|
|
445
|
+
version = "0.7.0"
|
|
446
446
|
dependencies = [
|
|
447
447
|
"criterion",
|
|
448
448
|
"libc",
|
|
@@ -457,7 +457,7 @@ dependencies = [
|
|
|
457
457
|
|
|
458
458
|
[[package]]
|
|
459
459
|
name = "rustorb-ffi"
|
|
460
|
-
version = "0.
|
|
460
|
+
version = "0.7.0"
|
|
461
461
|
dependencies = [
|
|
462
462
|
"rustorb-cdr",
|
|
463
463
|
"rustorb-core",
|
|
@@ -466,7 +466,7 @@ dependencies = [
|
|
|
466
466
|
|
|
467
467
|
[[package]]
|
|
468
468
|
name = "rustorb-giop"
|
|
469
|
-
version = "0.
|
|
469
|
+
version = "0.7.0"
|
|
470
470
|
dependencies = [
|
|
471
471
|
"rustorb-cdr",
|
|
472
472
|
"serde_json",
|
|
@@ -474,7 +474,7 @@ dependencies = [
|
|
|
474
474
|
|
|
475
475
|
[[package]]
|
|
476
476
|
name = "rustorb-interop"
|
|
477
|
-
version = "0.
|
|
477
|
+
version = "0.7.0"
|
|
478
478
|
dependencies = [
|
|
479
479
|
"rustorb-core",
|
|
480
480
|
"rustorb-naming",
|
|
@@ -491,14 +491,14 @@ dependencies = [
|
|
|
491
491
|
|
|
492
492
|
[[package]]
|
|
493
493
|
name = "rustorb-naming"
|
|
494
|
-
version = "0.
|
|
494
|
+
version = "0.7.0"
|
|
495
495
|
dependencies = [
|
|
496
496
|
"rustorb-core",
|
|
497
497
|
]
|
|
498
498
|
|
|
499
499
|
[[package]]
|
|
500
500
|
name = "rustorb-python"
|
|
501
|
-
version = "0.
|
|
501
|
+
version = "0.7.0"
|
|
502
502
|
dependencies = [
|
|
503
503
|
"pyo3",
|
|
504
504
|
"pyo3-build-config",
|
|
@@ -508,7 +508,7 @@ dependencies = [
|
|
|
508
508
|
|
|
509
509
|
[[package]]
|
|
510
510
|
name = "rustorb-typesupport"
|
|
511
|
-
version = "0.
|
|
511
|
+
version = "0.7.0"
|
|
512
512
|
dependencies = [
|
|
513
513
|
"rustorb-cdr",
|
|
514
514
|
]
|
|
@@ -3,7 +3,7 @@ resolver = "3"
|
|
|
3
3
|
members = ["crates/rustorb-cdr", "crates/rustorb-giop", "crates/rustorb-core", "crates/rustorb-python"]
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.7.0"
|
|
7
7
|
edition = "2024"
|
|
8
8
|
rust-version = "1.85"
|
|
9
9
|
license = "MIT OR Apache-2.0"
|
|
@@ -13,11 +13,11 @@ keywords = ["corba", "giop", "iiop", "orb", "rpc"]
|
|
|
13
13
|
categories = ["network-programming"]
|
|
14
14
|
|
|
15
15
|
[workspace.dependencies]
|
|
16
|
-
rustorb-cdr = { path = "crates/rustorb-cdr", version = "0.
|
|
17
|
-
rustorb-typesupport = { path = "crates/rustorb-typesupport", version = "0.
|
|
18
|
-
rustorb-giop = { path = "crates/rustorb-giop", version = "0.
|
|
19
|
-
rustorb-core = { path = "crates/rustorb-core", version = "0.
|
|
20
|
-
rustorb-naming = { path = "crates/rustorb-naming", version = "0.
|
|
16
|
+
rustorb-cdr = { path = "crates/rustorb-cdr", version = "0.7.0" }
|
|
17
|
+
rustorb-typesupport = { path = "crates/rustorb-typesupport", version = "0.7.0" }
|
|
18
|
+
rustorb-giop = { path = "crates/rustorb-giop", version = "0.7.0" }
|
|
19
|
+
rustorb-core = { path = "crates/rustorb-core", version = "0.7.0" }
|
|
20
|
+
rustorb-naming = { path = "crates/rustorb-naming", version = "0.7.0" }
|
|
21
21
|
tokio = { version = "1", default-features = false }
|
|
22
22
|
|
|
23
23
|
[workspace.lints.rust]
|
|
@@ -84,6 +84,12 @@ struct Frame {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
impl Encoder {
|
|
87
|
+
/// The number of values written so far (not counting indirections):
|
|
88
|
+
/// the slot a reader gives the next new value.
|
|
89
|
+
pub fn value_count(&self) -> usize {
|
|
90
|
+
self.values.as_ref().map_or(0, |s| s.written.len())
|
|
91
|
+
}
|
|
92
|
+
|
|
87
93
|
/// Writes a `null` value.
|
|
88
94
|
pub fn write_null_value(&mut self) {
|
|
89
95
|
self.write_u32(0);
|
|
@@ -110,7 +110,7 @@ pub use stream::{InStream, OutStream};
|
|
|
110
110
|
pub use timeout::{set_thread_call_timeout, thread_call_timeout};
|
|
111
111
|
pub use typecode::{TCKind, TypeCode, TypeCodeError};
|
|
112
112
|
pub use value::{
|
|
113
|
-
Any, CustomReader, Native, Value, ValueRef, ValueTypeResolver, lookup_value_type,
|
|
113
|
+
Any, CustomReader, Native, Value, ValueRef, ValueTypeResolver, WeakValueRef, lookup_value_type,
|
|
114
114
|
register_custom_reader, register_value_type, set_value_type_resolver, unregister_custom_reader,
|
|
115
115
|
unregister_value_type,
|
|
116
116
|
};
|
|
@@ -1193,9 +1193,21 @@ async fn invoke_async<A: WriteArgs + ?Sized>(
|
|
|
1193
1193
|
let _ = tx.send(call.run(&on_pool));
|
|
1194
1194
|
}));
|
|
1195
1195
|
// The pool is gone when the ORB is being destroyed.
|
|
1196
|
-
let
|
|
1197
|
-
Err(sys(SystemExceptionKind::TRANSIENT, 0, CompletionStatus::No))
|
|
1198
|
-
|
|
1196
|
+
let gone =
|
|
1197
|
+
|| Err(sys(SystemExceptionKind::TRANSIENT, 0, CompletionStatus::No));
|
|
1198
|
+
// The call timeout holds as for a remote object: the
|
|
1199
|
+
// servant may still be running when it passes.
|
|
1200
|
+
let result = match deadline {
|
|
1201
|
+
Some(at) => match tokio::time::timeout_at(at.into(), rx).await {
|
|
1202
|
+
Ok(r) => r.unwrap_or_else(|_| gone()),
|
|
1203
|
+
Err(_) => Err(sys(
|
|
1204
|
+
SystemExceptionKind::TIMEOUT,
|
|
1205
|
+
0,
|
|
1206
|
+
CompletionStatus::Maybe,
|
|
1207
|
+
)),
|
|
1208
|
+
},
|
|
1209
|
+
None => rx.await.unwrap_or_else(|_| gone()),
|
|
1210
|
+
};
|
|
1199
1211
|
local_outcome(orb, result, &mut reply_contexts)
|
|
1200
1212
|
}
|
|
1201
1213
|
Err(done) => done,
|
|
@@ -1670,6 +1682,7 @@ fn encode_request<A: WriteArgs + ?Sized>(
|
|
|
1670
1682
|
enc: m.body(),
|
|
1671
1683
|
code_sets,
|
|
1672
1684
|
orb: None,
|
|
1685
|
+
values: None,
|
|
1673
1686
|
};
|
|
1674
1687
|
args.write_args(&mut out)?;
|
|
1675
1688
|
}
|
|
@@ -21,6 +21,19 @@ pub struct OutStream<'a> {
|
|
|
21
21
|
/// The ORB of the first object reference written, so that a standalone
|
|
22
22
|
/// stream can be read back with it (`Any::insert`).
|
|
23
23
|
pub(crate) orb: Option<Orb>,
|
|
24
|
+
/// What a binding asked to know of the valuetypes written
|
|
25
|
+
/// ([`OutStream::log_values`]).
|
|
26
|
+
pub(crate) values: Option<ValueLog>,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// The valuetypes written to an [`OutStream`] that logs them.
|
|
30
|
+
#[derive(Debug, Default)]
|
|
31
|
+
pub(crate) struct ValueLog {
|
|
32
|
+
/// Whether every value is written chunked.
|
|
33
|
+
pub(crate) chunked: bool,
|
|
34
|
+
/// The instances written (not as indirections), in order: the n-th is
|
|
35
|
+
/// read back at slot n.
|
|
36
|
+
pub(crate) written: Vec<crate::ValueRef>,
|
|
24
37
|
}
|
|
25
38
|
|
|
26
39
|
impl<'a> OutStream<'a> {
|
|
@@ -32,6 +45,34 @@ impl<'a> OutStream<'a> {
|
|
|
32
45
|
enc,
|
|
33
46
|
code_sets: CodeSets::NATIVE,
|
|
34
47
|
orb: None,
|
|
48
|
+
values: None,
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/// Makes the stream keep the valuetype instances it writes, for
|
|
53
|
+
/// [`OutStream::written_values`], and write each value chunked (so
|
|
54
|
+
/// that a reader can skip one whole, nested values included). A
|
|
55
|
+
/// binding uses it to find the instance a value read back stands for.
|
|
56
|
+
pub fn log_values(&mut self) {
|
|
57
|
+
self.values = Some(ValueLog {
|
|
58
|
+
chunked: true,
|
|
59
|
+
written: Vec::new(),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/// The instances written since [`OutStream::log_values`] (not those
|
|
64
|
+
/// written as indirections), in order: the reader of the stream reads
|
|
65
|
+
/// the n-th at slot n.
|
|
66
|
+
pub fn written_values(&mut self) -> Vec<crate::ValueRef> {
|
|
67
|
+
self.values
|
|
68
|
+
.as_mut()
|
|
69
|
+
.map(|l| std::mem::take(&mut l.written))
|
|
70
|
+
.unwrap_or_default()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
pub(crate) fn note_value(&mut self, v: &crate::ValueRef) {
|
|
74
|
+
if let Some(log) = &mut self.values {
|
|
75
|
+
log.written.push(v.clone());
|
|
35
76
|
}
|
|
36
77
|
}
|
|
37
78
|
|
|
@@ -253,6 +294,22 @@ impl<'a> InStream<'a> {
|
|
|
253
294
|
}
|
|
254
295
|
}
|
|
255
296
|
|
|
297
|
+
/// Makes the value read at `slot` (the n-th value of the stream) be
|
|
298
|
+
/// read into `v`, replacing its state, if it has the type of `v`;
|
|
299
|
+
/// otherwise a new instance is made as usual. A binding uses it to
|
|
300
|
+
/// keep the instance a value it wrote already stands for.
|
|
301
|
+
pub fn preset_value(&mut self, slot: usize, v: crate::ValueRef) {
|
|
302
|
+
if self.values.len() <= slot {
|
|
303
|
+
self.values.resize(slot + 1, None);
|
|
304
|
+
}
|
|
305
|
+
self.values[slot] = Some(v);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/// The instance read at `slot`, if any.
|
|
309
|
+
pub fn value_at(&self, slot: usize) -> Option<&crate::ValueRef> {
|
|
310
|
+
self.values.get(slot).and_then(Option::as_ref)
|
|
311
|
+
}
|
|
312
|
+
|
|
256
313
|
/// The rest of the stream, owned, if it reads a message body and no
|
|
257
314
|
/// valuetype has been read (later ones could refer to it).
|
|
258
315
|
pub(crate) fn detach(&self) -> Option<DetachedInput> {
|
|
@@ -281,6 +281,29 @@ fn each_ref(v: &Value, f: &mut impl FnMut(&ValueRef)) {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
/// A [`ValueRef`] that does not keep the instance alive (see
|
|
285
|
+
/// [`ValueRef::downgrade`]).
|
|
286
|
+
#[derive(Clone)]
|
|
287
|
+
pub struct WeakValueRef(std::sync::Weak<ValueObj>);
|
|
288
|
+
|
|
289
|
+
impl WeakValueRef {
|
|
290
|
+
/// The instance, if it is still alive.
|
|
291
|
+
pub fn upgrade(&self) -> Option<ValueRef> {
|
|
292
|
+
self.0.upgrade().map(ValueRef)
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/// Whether the instance has been dropped (or is being dropped).
|
|
296
|
+
pub fn is_dead(&self) -> bool {
|
|
297
|
+
self.0.strong_count() == 0
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
impl std::fmt::Debug for WeakValueRef {
|
|
302
|
+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
303
|
+
f.write_str("WeakValueRef")
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
284
307
|
/// An instance of a valuetype or a value box: its type and its state.
|
|
285
308
|
///
|
|
286
309
|
/// Clones share the instance, as references do in the language
|
|
@@ -364,6 +387,11 @@ impl ValueRef {
|
|
|
364
387
|
Arc::as_ptr(&self.0) as usize as u64
|
|
365
388
|
}
|
|
366
389
|
|
|
390
|
+
/// A reference that does not keep the instance alive.
|
|
391
|
+
pub fn downgrade(&self) -> WeakValueRef {
|
|
392
|
+
WeakValueRef(Arc::downgrade(&self.0))
|
|
393
|
+
}
|
|
394
|
+
|
|
367
395
|
fn lock(&self) -> MutexGuard<'_, Vec<Value>> {
|
|
368
396
|
self.0.members.lock().unwrap_or_else(|e| e.into_inner())
|
|
369
397
|
}
|
|
@@ -811,9 +839,11 @@ fn write_valuetype(
|
|
|
811
839
|
let ids: Vec<&str> = ids.iter().map(String::as_str).collect();
|
|
812
840
|
// A value of a truncatable type is chunked, so that a receiver can
|
|
813
841
|
// skip what it does not know.
|
|
814
|
-
|
|
842
|
+
let chunked = ids.len() > 1 || out.values.as_ref().is_some_and(|l| l.chunked);
|
|
843
|
+
if !out.begin_value(v.key(), &ids, chunked)? {
|
|
815
844
|
return Ok(());
|
|
816
845
|
}
|
|
846
|
+
out.note_value(v);
|
|
817
847
|
let types = state_types(&tc);
|
|
818
848
|
let members = v.members();
|
|
819
849
|
if members.len() != types.len() {
|
|
@@ -836,6 +866,7 @@ fn write_custom(
|
|
|
836
866
|
if !out.begin_value(v.key(), &[tc.id().unwrap_or_default()], true)? {
|
|
837
867
|
return Ok(());
|
|
838
868
|
}
|
|
869
|
+
out.note_value(v);
|
|
839
870
|
for item in v.members() {
|
|
840
871
|
let Value::Any(item) = item else {
|
|
841
872
|
return Err(bad_param());
|
|
@@ -1085,10 +1116,15 @@ impl Reader {
|
|
|
1085
1116
|
Ok(VM_ABSTRACT) => return Err(input.marshal_error()),
|
|
1086
1117
|
_ => None,
|
|
1087
1118
|
};
|
|
1088
|
-
let v = ValueRef::new(tc.clone(), Vec::new());
|
|
1089
1119
|
if input.values.len() <= slot {
|
|
1090
1120
|
input.values.resize(slot + 1, None);
|
|
1091
1121
|
}
|
|
1122
|
+
// An instance set for this slot beforehand (`InStream::preset_value`)
|
|
1123
|
+
// is read into, if it has the type read.
|
|
1124
|
+
let v = match input.values[slot].take() {
|
|
1125
|
+
Some(r) if r.typecode().id().ok() == tc.id().ok() => r,
|
|
1126
|
+
_ => ValueRef::new(tc.clone(), Vec::new()),
|
|
1127
|
+
};
|
|
1092
1128
|
input.values[slot] = Some(v.clone());
|
|
1093
1129
|
if let Some(reader) = custom {
|
|
1094
1130
|
reader(&v, input)?;
|
|
@@ -282,6 +282,24 @@ fn objects_of_the_same_orb() {
|
|
|
282
282
|
assert!(rx.recv_timeout(Duration::from_secs(10)).unwrap());
|
|
283
283
|
assert_eq!(*servant.posted.lock().unwrap(), vec![2]);
|
|
284
284
|
|
|
285
|
+
// The call timeout holds for them too.
|
|
286
|
+
let (tx, rx) = mpsc::channel();
|
|
287
|
+
obj.request_callback("sleep")
|
|
288
|
+
.args(|out| {
|
|
289
|
+
out.write_u32(2000);
|
|
290
|
+
Ok(())
|
|
291
|
+
})
|
|
292
|
+
.timeout(Some(Duration::from_millis(100)))
|
|
293
|
+
.send(move |r| {
|
|
294
|
+
let _ = tx.send(r);
|
|
295
|
+
})
|
|
296
|
+
.unwrap();
|
|
297
|
+
let e = system_of(rx.recv_timeout(Duration::from_secs(1)).unwrap());
|
|
298
|
+
assert_eq!(e.kind(), Some(SystemExceptionKind::TIMEOUT));
|
|
299
|
+
assert_eq!(e.completed, CompletionStatus::Maybe);
|
|
300
|
+
// Let the servant finish before the ORB goes.
|
|
301
|
+
thread::sleep(Duration::from_millis(2000));
|
|
302
|
+
|
|
285
303
|
orb.destroy().unwrap();
|
|
286
304
|
}
|
|
287
305
|
|
|
@@ -4,9 +4,9 @@ none).
|
|
|
4
4
|
A call waits for its reply as long as the first of these that is set
|
|
5
5
|
says:
|
|
6
6
|
|
|
7
|
-
1. the
|
|
8
|
-
2. the object reference's (:func:`set_object_call_timeout`), shared by
|
|
7
|
+
1. the object reference's (:func:`set_object_call_timeout`), shared by
|
|
9
8
|
the references narrowed from it,
|
|
9
|
+
2. the calling thread's timeout (:func:`set_thread_call_timeout`),
|
|
10
10
|
3. the ORB's (:func:`set_call_timeout`, or ``-ORBclientCallTimeOutPeriod``).
|
|
11
11
|
|
|
12
12
|
When the time is up, the call raises ``CORBA.TIMEOUT`` with
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|