{"record":{"id":"a448f8d11857fbf2","repo":"sxyazi/yazi","slug":"timeout-is-too-large-for-the-platform","errorCode":null,"errorMessage":"timeout is too large for the platform","messagePattern":"timeout is too large for the platform","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"yazi-term/src/source/unix.rs","lineNumber":152,"sourceCode":"\t\t}\n\t\tunsafe { rustix::event::select(nfds, Some(&mut set), None, None, timeout) }?;\n\n\t\tlet mut result = [false; 3];\n\t\tfor (fd, ready) in fds.iter().copied().zip(result.iter_mut()) {\n\t\t\tif FdSetIter::new(&set).any(|x| x == fd) {\n\t\t\t\t*ready = true;\n\t\t\t}\n\t\t}\n\t\tOk(result)\n\t}\n\n\t#[cfg(target_os = \"macos\")]\n\t// rustix rounds nanoseconds up to microseconds for select(), which can produce tv_usec =\n\t// 1_000_000.\n\tlet timeout = timeout.map(|t| Duration::new(t.as_secs(), t.subsec_micros() * 1000));\n\n\tlet timespec = timeout.map(|t| t.try_into()).transpose().map_err(|_| {\n\t\tio::Error::new(io::ErrorKind::InvalidInput, \"timeout is too large for the platform\")\n\t})?;\n\n\t#[cfg(not(target_os = \"macos\"))]\n\treturn poll3(fds, timespec.as_ref());\n\t#[cfg(target_os = \"macos\")]\n\treturn select3(fds, timespec.as_ref());\n}\n","sourceCodeStart":134,"sourceCodeEnd":160,"githubUrl":"https://github.com/sxyazi/yazi/blob/441b332de8b8800e70784cfbfb75369ab51ed9dd/yazi-term/src/source/unix.rs#L134-L160","documentation":"Error \"timeout is too large for the platform\" thrown in sxyazi/yazi.","triggerScenarios":"Thrown at yazi-term/src/source/unix.rs:152 when the library encounters an invalid state.","commonSituations":"Polling with a timeout value that exceeds what the platform's poll/ppoll interface can represent.","solutions":["Use a smaller timeout value that fits the platform's timer representation (check the duration passed to the poll)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"441b332de8b8800e70784cfbfb75369ab51ed9dd","analyzedAt":"2026-08-19T05:27:26.468Z","contentChangedAt":"2026-08-19T05:27:26.468Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}