submitAndWaitWithTimeout() — netty Function Reference
Architecture documentation for the submitAndWaitWithTimeout() function in IoUringIoHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d9450b94_1e0b_e88a_fddc_604693afc7b9["submitAndWaitWithTimeout()"] 54b1e24c_acd2_7686_4313_2695f1b73de1["IoUringIoHandler"] d9450b94_1e0b_e88a_fddc_604693afc7b9 -->|defined in| 54b1e24c_acd2_7686_4313_2695f1b73de1 3febc8f5_f331_c39c_6774_12a24143add8["run()"] 3febc8f5_f331_c39c_6774_12a24143add8 -->|calls| d9450b94_1e0b_e88a_fddc_604693afc7b9 093f8eee_4384_b7ac_3228_6a911c17e627["destroy()"] 093f8eee_4384_b7ac_3228_6a911c17e627 -->|calls| d9450b94_1e0b_e88a_fddc_604693afc7b9 style d9450b94_1e0b_e88a_fddc_604693afc7b9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringIoHandler.java lines 312–342
private int submitAndWaitWithTimeout(SubmissionQueue submissionQueue,
boolean linkTimeout, long timeoutNanoSeconds) {
if (timeoutNanoSeconds != -1) {
long udata = UserData.encode(RINGFD_ID,
linkTimeout ? Native.IORING_OP_LINK_TIMEOUT : Native.IORING_OP_TIMEOUT, (short) 0);
// We use the same timespec pointer for all add*Timeout operations. This only works because we call
// submit directly after it. This ensures the submitted timeout is considered "stable" and so can be reused.
long seconds, nanoSeconds;
if (timeoutNanoSeconds == 0) {
seconds = 0;
nanoSeconds = 0;
} else {
seconds = (int) min(timeoutNanoSeconds / 1000000000L, Integer.MAX_VALUE);
nanoSeconds = (int) max(timeoutNanoSeconds - seconds * 1000000000L, 0);
}
timeoutMemory.putLong(KERNEL_TIMESPEC_TV_SEC_FIELD, seconds);
timeoutMemory.putLong(KERNEL_TIMESPEC_TV_NSEC_FIELD, nanoSeconds);
if (linkTimeout) {
submissionQueue.addLinkTimeout(timeoutMemoryAddress, udata);
} else {
submissionQueue.addTimeout(timeoutMemoryAddress, udata);
}
}
int submitted = submissionQueue.submitAndGet();
// Clear the iovArray as we can re-use it now as things are considered stable after submission:
// See https://man7.org/linux/man-pages/man3/io_uring_prep_sendmsg.3.html
iovArray.clear();
msgHdrMemoryArray.clear();
return submitted;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does submitAndWaitWithTimeout() do?
submitAndWaitWithTimeout() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringIoHandler.java.
Where is submitAndWaitWithTimeout() defined?
submitAndWaitWithTimeout() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringIoHandler.java at line 312.
What calls submitAndWaitWithTimeout()?
submitAndWaitWithTimeout() is called by 2 function(s): destroy, run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free