{"record":{"id":"667948e08d47cfcf","repo":"pola-rs/polars","slug":"integer-667948","errorCode":null,"errorMessage":"integer","messagePattern":"integer","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-io/src/pl_async.rs","lineNumber":148,"sourceCode":"                }\n            },\n            Optimization::Finished => {},\n        }\n        self.last_tune = std::time::Instant::now();\n        // Not finished.\n        false\n    }\n}\nstatic INCR: RelaxedCell<u64> = RelaxedCell::new_u64(0);\nstatic FINISHED_TUNING: RelaxedCell<bool> = RelaxedCell::new_bool(false);\nstatic PERMIT_STORE: std::sync::OnceLock<tokio::sync::RwLock<SemaphoreTuner>> =\n    std::sync::OnceLock::new();\n\nfn get_semaphore() -> &'static (Semaphore, u32) {\n    CONCURRENCY_BUDGET.get_or_init(|| {\n        let permits = std::env::var(\"POLARS_CONCURRENCY_BUDGET\")\n            .map(|s| {\n                let budget = s.parse::<usize>().expect(\"integer\");\n                FINISHED_TUNING.store(true);\n                budget\n            })\n            .unwrap_or_else(|_| std::cmp::max(RAYON.current_num_threads(), MAX_BUDGET_PER_REQUEST));\n        (Semaphore::new(permits), permits as u32)\n    })\n}\n\npub fn get_concurrency_limit() -> u32 {\n    get_semaphore().1\n}\n\npub async fn tune_with_concurrency_budget<F, Fut>(requested_budget: u32, callable: F) -> Fut::Output\nwhere\n    F: FnOnce() -> Fut,\n    Fut: Future,\n    Fut::Output: GetSize,\n{","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/crates/polars-io/src/pl_async.rs#L130-L166","documentation":"Error \"integer\" thrown in pola-rs/polars.","triggerScenarios":"Thrown at crates/polars-io/src/pl_async.rs:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}