Skip to main content
View all authors

Control Processing Concurrency in CocoIndex

· 6 min read

cover

CocoIndex is designed to be production-ready from day one—built to process data in parallel, maximizing throughput while keeping your systems safe. Today, we’ll look at how to optimize performance without overloading your environment. With CocoIndex, it’s just one configuration away.

Thinking in Rust: Ownership, Access, and Memory Safety

· 9 min read

Thinking in Rust: Ownership, Access, and Memory Safety

I'm an experienced C++ programmer, but still feel that I need a mindset shift when starting to work with Rust.

  • References can be immutable (&) or mutable (&mut), which is straightforward for simplest cases. There are more complex cases, e.g. there are data types with interior mutability (e.g. RefCell), there are multi-level references (& &mut).
  • Rust also models memory safety in multi-thread scenarios, so there's Send and Sync. They have intricate rules related to various types of references, e.g. when &T is Send or Sync? How about &mut T?
  • There are various data types, like Rc , Arc, Cell, RefCell, Mutex, RwLock, Cow . When to pick which?