We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
codes_index
ecCodes 2.33.0 manual build with POSIX-threads enabled.
Minimal example:
use std::{ffi::CString, thread}; fn main() { let t1 = thread::spawn(|| thread1("T1")); let t2 = thread::spawn(|| thread1("T3")); t1.join().unwrap(); t2.join().unwrap(); } fn thread1(name: &str) { let keys = CString::new("shortName, typeOfLevel").unwrap(); let grib_file = CString::new("./data/iceland-surface.grib").unwrap(); let mut err = 0; let ci; unsafe { let ctx = eccodes_sys::codes_context_get_default(); println!("{name}: index_new"); ci = eccodes_sys::codes_index_new(ctx, keys.as_ptr(), &mut err); println!("{name}: index_new: {err:?}"); println!("{name}: index_add_file"); err = eccodes_sys::codes_index_add_file(ci, grib_file.as_ptr()); println!("{name}: index_add_file: {err:?}"); thread::sleep(std::time::Duration::from_secs(3)); println!("{name}: index_delete"); eccodes_sys::codes_index_delete(ci); println!("{name}: index deleted"); } }
With eventually fail like so:
cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.01s Running `target/debug/ec-test` T1: index_new T3: index_new T1: index_new: 0 T1: index_add_file T3: index_new: 0 T3: index_add_file T1: index_add_file: -11 [1] 112709 segmentation fault (core dumped) cargo run
The text was updated successfully, but these errors were encountered:
When branches are created from issues, their pull requests are automatically linked.
ecCodes 2.33.0 manual build with POSIX-threads enabled.
Minimal example:
With eventually fail like so:
The text was updated successfully, but these errors were encountered: