| /external/jimfs/jimfs/src/test/java/com/google/common/jimfs/ |
| D | JimfsFileChannelTest.java | 66 * interactions with the file and channel positions. 73 private static FileChannel channel(RegularFile file, OpenOption... options) throws IOException { in channel() method in JimfsFileChannelTest 82 FileChannel channel = channel(regularFile(10), READ); in testPosition() local 83 assertEquals(0, channel.position()); in testPosition() 84 assertSame(channel, channel.position(100)); in testPosition() 85 assertEquals(100, channel.position()); in testPosition() 91 FileChannel channel = channel(file, READ); in testSize() local 93 assertEquals(10, channel.size()); in testSize() 96 assertEquals(100, channel.size()); in testSize() 102 FileChannel channel = channel(file, READ); in testRead() local [all …]
|
| /external/perfetto/src/base/threading/ |
| D | channel_unittest.cc | 17 #include "perfetto/ext/base/threading/channel.h" 39 using ReadResult = Channel<int>::ReadResult; 40 using WriteResult = Channel<int>::WriteResult; 64 Channel<int> channel(1); in TEST() local 65 ASSERT_TRUE(IsReady(channel.write_fd())); in TEST() 66 ASSERT_FALSE(IsReady(channel.read_fd())); in TEST() 68 ASSERT_EQ(channel.WriteNonBlocking(100), WriteResult(true, false)); in TEST() 69 ASSERT_EQ(channel.WriteNonBlocking(101), WriteResult(false, false)); in TEST() 71 ASSERT_FALSE(IsReady(channel.write_fd())); in TEST() 72 ASSERT_TRUE(IsReady(channel.read_fd())); in TEST() [all …]
|
| /external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/selects/ |
| D | SelectRendezvousChannelTest.kt | 17 val channel = Channel<String>(Channel.RENDEZVOUS) in <lambda>() constant 20 assertEquals("OK", channel.receive()) in <lambda>() 26 channel.onSend("OK") { in <lambda>() 36 val channel = Channel<String>(Channel.RENDEZVOUS) in <lambda>() constant 39 assertEquals("OK", channel.receive()) in <lambda>() 45 channel.onSend("OK") { in <lambda>() 58 val channel = Channel<String>(Channel.RENDEZVOUS) in <lambda>() constant 60 channel.onSend("OK") { in <lambda>() 71 assertEquals("CHK", channel.receive()) in <lambda>() 77 channel.send("CHK") in <lambda>() [all …]
|
| D | SelectBufferedChannelTest.kt | 16 val channel = Channel<String>(1) in <lambda>() constant 19 assertEquals("OK", channel.receive()) in <lambda>() 25 channel.onSend("OK") { in <lambda>() 35 val channel = Channel<String>(1) in <lambda>() constant 38 assertEquals("OK", channel.receive()) in <lambda>() 44 channel.onSend("OK") { in <lambda>() 57 val channel = Channel<String>(1) in <lambda>() constant 59 channel.onSend("OK") { in <lambda>() 65 channel.onReceive { v -> in <lambda>() 76 val channel = Channel<String>(1) in <lambda>() constant [all …]
|
| /external/grpc-grpc/src/php/ext/grpc/ |
| D | channel.c | 19 #include "channel.h" 46 void free_grpc_channel_wrapper(grpc_channel_wrapper* channel, bool free_channel) { in free_grpc_channel_wrapper() argument 48 grpc_channel_destroy(channel->wrapped); in free_grpc_channel_wrapper() 49 channel->wrapped = NULL; in free_grpc_channel_wrapper() 51 free(channel->target); in free_grpc_channel_wrapper() 52 free(channel->args_hashstr); in free_grpc_channel_wrapper() 53 free(channel->creds_hashstr); in free_grpc_channel_wrapper() 54 free(channel->key); in free_grpc_channel_wrapper() 55 channel->target = NULL; in free_grpc_channel_wrapper() 56 channel->args_hashstr = NULL; in free_grpc_channel_wrapper() [all …]
|
| /external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/channels/ |
| D | ChannelUndeliveredElementFailureTest.kt | 13 * Tests for failures inside `onUndeliveredElement` handler in [Channel]. 25 val channel = Channel(onUndeliveredElement = onCancelFail) in isElementCancelException() constant 27 channel.send(item) in isElementCancelException() 35 val channel = Channel(onUndeliveredElement = onCancelFail) in <lambda>() constant 38 channel.onSend(item) { in <lambda>() 48 val channel = Channel(onUndeliveredElement = onCancelFail) in <lambda>() constant 50 channel.receive() in <lambda>() 53 channel.send(item) in <lambda>() 59 val channel = Channel(onUndeliveredElement = onCancelFail) in <lambda>() constant 62 channel.onReceive { in <lambda>() [all …]
|
| D | ChannelUndeliveredElementTest.kt | 15 val channel = kind.create<Resource> { it.cancel() } in <lambda>() constant 18 channel.send(res) in <lambda>() 20 val ok = channel.receive() in <lambda>() 23 channel.close() in <lambda>() 30 val channel = Channel<Resource> { it.cancel() } in <lambda>() constant 34 channel.send(res) // suspends & get cancelled in <lambda>() 43 val channel = Channel<Resource>(1) { it.cancel() } in <lambda>() constant 47 channel.send(resA) // goes to buffer in <lambda>() 49 channel.send(resB) // suspends & get cancelled in <lambda>() 55 channel.cancel() // now cancel the channel in <lambda>() [all …]
|
| D | ChannelReceiveCatchingTest.kt | 13 val channel = Channel<Throwable>() in <lambda>() constant 15 channel.send(TestException1()) in <lambda>() 16 channel.close(TestException2()) in <lambda>() 19 val element = channel.receiveCatching() in <lambda>() 23 val closed = channel.receiveCatching() in <lambda>() 32 val channel = Channel<Int?>() in <lambda>() constant 35 channel.send(1) in <lambda>() 37 channel.send(null) in <lambda>() 40 channel.close() in <lambda>() 44 val element = channel.receiveCatching() in <lambda>() [all …]
|
| D | BasicOperationsTest.kt | 40 val channel = kind.create<Int>() in <lambda>() constant 41 channel.invokeOnClose { in <lambda>() 47 channel.trySend(42) in <lambda>() 49 channel.close(AssertionError()) in <lambda>() 57 val channel = kind.create<Int>() in <lambda>() constant 58 channel.close() in <lambda>() 59 channel.invokeOnClose { expect(2) } in <lambda>() 60 assertFailsWith<IllegalStateException> { channel.invokeOnClose { expect(3) } } in <lambda>() 67 val channel = kind.create<Int>() in <lambda>() constant 68 channel.invokeOnClose { expect(3) } in <lambda>() [all …]
|
| /external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/channels/ |
| D | Channel.kt | 10 import kotlinx.coroutines.channels.Channel.Factory.BUFFERED 11 import kotlinx.coroutines.channels.Channel.Factory.CHANNEL_DEFAULT_CAPACITY 12 import kotlinx.coroutines.channels.Channel.Factory.CONFLATED 13 import kotlinx.coroutines.channels.Channel.Factory.RENDEZVOUS 14 import kotlinx.coroutines.channels.Channel.Factory.UNLIMITED 22 * Sender's interface to [Channel]. 26 …* Returns `true` if this channel was closed by an invocation of [close] or its receiving side was … 30 …* channel can be concurrently closed right after the check. For such scenarios, it is recommended … 40 …* Sends the specified [element] to this channel, suspending the caller while the buffer of this ch… 41 …* or if it does not exist, or throws an exception if the channel [is closed for `send`][isClosedFo… [all …]
|
| /external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/exceptions/ |
| D | StackTraceRecoveryChannelsTest.kt | 20 val channel = Channel<Int>() in <lambda>() constant 23 channel.close(RecoverableTestException()) in <lambda>() 27 channelReceive(channel) in <lambda>() 35 val channel = Channel<Int>() in <lambda>() constant 36 channel.close(RecoverableTestException()) in <lambda>() 37 channelReceive(channel) in <lambda>() 42 val channel = Channel<Int>() in <lambda>() constant 43 channel.close(RecoverableTestException()) in <lambda>() 44 channelSend(channel) in <lambda>() 49 val channel = Channel<Int>() in <lambda>() constant [all …]
|
| /external/python/cpython3/Lib/test/ |
| D | test_smtpd.py | 50 channel = smtpd.SMTPChannel(server, conn, addr, decode_data=True) 53 channel.socket.queue_recv(line) 54 channel.handle_read() 81 def send_data(self, channel, data, enable_SMTPUTF8=False): argument 83 channel.socket.queue_recv(line) 84 channel.handle_read() 99 channel = smtpd.SMTPChannel(server, conn, addr, decode_data=True) 101 self.send_data(channel, b'From: test\n\nhello\n') 115 channel = smtpd.SMTPChannel(server, conn, addr) 117 self.send_data(channel, b'From: test\n\nh\xc3\xa9llo\xff\n') [all …]
|
| /external/webrtc/audio/voip/ |
| D | voip_core.cc | 134 rtc::scoped_refptr<AudioChannel> channel = in CreateChannel() local 143 channels_[channel_id] = channel; in CreateChannel() 150 // Set ChannelId in audio channel for logging/debugging purpose. in CreateChannel() 151 channel->SetId(channel_id); in CreateChannel() 157 // Destroy channel outside of the lock. in ReleaseChannel() 158 rtc::scoped_refptr<AudioChannel> channel; in ReleaseChannel() local 167 channel = std::move(iter->second); in ReleaseChannel() 175 if (!channel) { in ReleaseChannel() 176 RTC_LOG(LS_WARNING) << "Channel " << channel_id << " not found"; in ReleaseChannel() 181 // TODO(bugs.webrtc.org/11581): unclear if we still need to clear `channel` in ReleaseChannel() [all …]
|
| /external/grpc-grpc/src/core/lib/surface/ |
| D | channel.cc | 21 #include "src/core/lib/surface/channel.h" 33 #include "src/core/lib/channel/channel_args.h" 34 #include "src/core/lib/channel/channel_trace.h" 35 #include "src/core/lib/channel/channelz.h" 85 grpc_channel* channel; in grpc_channel_create_with_builder() local 93 reinterpret_cast<void**>(&channel)); in grpc_channel_create_with_builder() 95 gpr_log(GPR_ERROR, "channel stack builder failed: %s", in grpc_channel_create_with_builder() 100 return channel; in grpc_channel_create_with_builder() 103 channel->target = target; in grpc_channel_create_with_builder() 104 channel->is_client = grpc_channel_stack_type_is_client(channel_stack_type); in grpc_channel_create_with_builder() [all …]
|
| /external/grpc-grpc/src/csharp/Grpc.Core.Tests/ |
| D | ChannelTest.cs | 33 …Assert.Throws(typeof(ArgumentNullException), () => new Channel(null, ChannelCredentials.Insecure)); in Constructor_RejectsInvalidParams() 44 …Assert.Throws(typeof(ArgumentException), () => new Channel("127.0.0.1", ChannelCredentials.Insecur… in Constructor_RejectsDuplicateOptions() 50 var channel = new Channel("localhost", ChannelCredentials.Insecure); in State_IdleAfterCreation() 51 Assert.AreEqual(ChannelState.Idle, channel.State); in State_IdleAfterCreation() 52 channel.ShutdownAsync().Wait(); in State_IdleAfterCreation() 58 var channel = new Channel("localhost", ChannelCredentials.Insecure); in WaitForStateChangedAsync_InvalidArgument() 59 …Assert.ThrowsAsync(typeof(ArgumentException), async () => await channel.WaitForStateChangedAsync(C… in WaitForStateChangedAsync_InvalidArgument() 60 channel.ShutdownAsync().Wait(); in WaitForStateChangedAsync_InvalidArgument() 66 var channel = new Channel("127.0.0.1", ChannelCredentials.Insecure); in ResolvedTarget() 67 Assert.IsTrue(channel.ResolvedTarget.Contains("127.0.0.1")); in ResolvedTarget() [all …]
|
| /external/grpc-grpc/src/python/grpcio_tests/tests/fork/ |
| D | methods.py | 39 channel = grpc.secure_channel(target, channel_credentials) 41 channel = grpc.insecure_channel(target) 42 return channel 144 def _async_unary_same_channel(channel): argument 150 'Child should not be able to re-use channel after fork') 154 stub = test_pb2_grpc.TestServiceStub(channel) 162 def _async_unary_new_channel(channel, args): argument 170 stub = test_pb2_grpc.TestServiceStub(channel) 178 def _blocking_unary_same_channel(channel): argument 184 'Child should not be able to re-use channel after fork') [all …]
|
| /external/rust/crates/grpcio-sys/grpc/third_party/cares/cares/ |
| D | ares_init.c | 68 static int init_by_options(ares_channel channel, 71 static int init_by_environment(ares_channel channel); 72 static int init_by_resolv_conf(ares_channel channel); 73 static int init_by_defaults(ares_channel channel); 79 static int set_search(ares_channel channel, const char *str); 80 static int set_options(ares_channel channel, const char *str); 92 static int config_domain(ares_channel channel, char *str); 93 static int config_lookup(ares_channel channel, const char *str, 113 ares_channel channel; in ares_init_options() local 135 channel = ares_malloc(sizeof(struct ares_channeldata)); in ares_init_options() [all …]
|
| D | ares_process.c | 65 static void write_tcp_data(ares_channel channel, fd_set *write_fds, 67 static void read_tcp_data(ares_channel channel, fd_set *read_fds, 69 static void read_udp_packets(ares_channel channel, fd_set *read_fds, 71 static void advance_tcp_send_queue(ares_channel channel, int whichserver, 73 static void process_timeouts(ares_channel channel, struct timeval *now); 74 static void process_broken_connections(ares_channel channel, 76 static void process_answer(ares_channel channel, unsigned char *abuf, 79 static void handle_error(ares_channel channel, int whichserver, 81 static void skip_server(ares_channel channel, struct query *query, 83 static void next_server(ares_channel channel, struct query *query, [all …]
|
| /external/grpc-grpc-java/core/src/main/java/io/grpc/ |
| D | ClientInterceptors.java | 36 * Create a new {@link Channel} that will call {@code interceptors} before starting a call on the 37 * given channel. The first interceptor will have its {@link ClientInterceptor#interceptCall} 40 * @param channel the underlying channel to intercept. 41 * @param interceptors array of interceptors to bind to {@code channel}. 42 * @return a new channel instance with the interceptors applied. 44 public static Channel interceptForward(Channel channel, ClientInterceptor... interceptors) { in interceptForward() argument 45 return interceptForward(channel, Arrays.asList(interceptors)); in interceptForward() 49 * Create a new {@link Channel} that will call {@code interceptors} before starting a call on the 50 * given channel. The first interceptor will have its {@link ClientInterceptor#interceptCall} 53 * @param channel the underlying channel to intercept. [all …]
|
| /external/grpc-grpc/src/php/lib/Grpc/ |
| D | BaseStub.php | 30 private $channel; variable in Grpc\\BaseStub 42 …* @param Channel|InterceptorChannel $channel An already created Channel or InterceptorChannel obje… 44 public function __construct($hostname, $opts, $channel = null) argument 66 // If the grpc_call_invoker is defined, use the channel created by the call invoker. 67 $this->channel = $this->call_invoker->createChannelFactory($hostname, $channel_opts); 71 if ($channel) { 72 if (!is_a($channel, 'Grpc\Channel') && 73 !is_a($channel, 'Grpc\Internal\InterceptorChannel')) { 74 throw new \Exception('The channel argument is not a Channel object '. 76 'Interceptor::intercept($channel, Interceptor|Interceptor[] $interceptors)'); [all …]
|
| /external/autotest/utils/frozen_chromite/third_party/googleapiclient/ |
| D | channel.py | 1 """Channel notifications support. 3 Classes and functions to support channel subscriptions and notifications 10 - Storing the Channel between calls is up to the caller. 13 Example setting up a channel: 15 # Create a new channel that gets notifications via webhook. 16 channel = new_webhook_channel("https://example.com/my_web_hook") 18 # Store the channel, keyed by 'channel.id'. Store it before calling the 24 bucket="some_bucket_id", body=channel.body()).execute() 25 channel.update(resp) 27 # Store the channel, keyed by 'channel.id'. Store it after being updated [all …]
|
| /external/python/google-api-python-client/googleapiclient/ |
| D | channel.py | 15 """Channel notifications support. 17 Classes and functions to support channel subscriptions and notifications 24 - Storing the Channel between calls is up to the caller. 27 Example setting up a channel: 29 # Create a new channel that gets notifications via webhook. 30 channel = new_webhook_channel("https://example.com/my_web_hook") 32 # Store the channel, keyed by 'channel.id'. Store it before calling the 38 bucket="some_bucket_id", body=channel.body()).execute() 39 channel.update(resp) 41 # Store the channel, keyed by 'channel.id'. Store it after being updated [all …]
|
| /external/rust/crates/grpcio-sys/grpc/third_party/cares/cares/test/ |
| D | ares-test-init.cc | 48 ares_channel channel = nullptr; in TEST() local 49 EXPECT_EQ(ARES_SUCCESS, ares_init(&channel)); in TEST() 50 EXPECT_NE(nullptr, channel); in TEST() 51 ares_destroy(channel); in TEST() 92 ares_channel channel = nullptr; in TEST_F() local 93 EXPECT_EQ(ARES_SUCCESS, ares_init_options(&channel, &opts, optmask)); in TEST_F() 94 EXPECT_NE(nullptr, channel); in TEST_F() 97 EXPECT_EQ(ARES_SUCCESS, ares_dup(&channel2, channel)); in TEST_F() 121 ares_destroy(channel); in TEST_F() 126 ares_channel channel; in TEST_F() local [all …]
|
| /external/rust/crates/grpcio-sys/grpc/src/core/lib/surface/ |
| D | channel.cc | 21 #include "src/core/lib/surface/channel.h" 33 #include "src/core/lib/channel/channel_args.h" 34 #include "src/core/lib/channel/channel_trace.h" 35 #include "src/core/lib/channel/channelz.h" 36 #include "src/core/lib/channel/channelz_registry.h" 67 grpc_channel* channel; in grpc_channel_create_with_builder() local 75 reinterpret_cast<void**>(&channel)); in grpc_channel_create_with_builder() 77 gpr_log(GPR_ERROR, "channel stack builder failed: %s", in grpc_channel_create_with_builder() 79 GPR_ASSERT(channel == nullptr); in grpc_channel_create_with_builder() 89 channel->target = target; in grpc_channel_create_with_builder() [all …]
|
| /external/openthread/src/core/utils/ |
| D | channel_manager.hpp | 31 * This file includes definitions for Channel Manager. 52 * @addtogroup utils-channel-manager 55 * This module includes definitions for Channel Manager. 61 * This class implements the Channel Manager. 68 * Minimum delay (in seconds) used for network channel change. 82 * This method requests a Thread network channel change. 84 …* The Thread network switches to the given channel after a specified delay (@sa GetDelay()). The c… 87 * A subsequent call to this method will cancel an ongoing previously requested channel change. 89 …* If the requested channel changes, it will trigger a `Notifier` event `kEventChannelManagerNewCha… 91 * @param[in] aChannel The new channel for the Thread network. [all …]
|