# Package for Rust-like borrow checker in Julia?

**URL:** <https://discourse.julialang.org/t/package-for-rust-like-borrow-checker-in-julia/124442>\
**Category:** General Usage\
**Tags:** question\
**Created:** [January 5, 2025, 11:17am UTC](https://discourse.julialang.org/t/package-for-rust-like-borrow-checker-in-julia/124442 "2025-01-05T11:17:12Z")\
**Posts on this page:** 1\
**Showing post:** 55

<div class="post-metadata">

**Author:** ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Post date:** [January 7, 2025, 3:51am UTC](https://discourse.julialang.org/t/package-for-rust-like-borrow-checker-in-julia/124442/55 "2025-01-07T03:51:34Z")

</div>

Does anyone know if there a mechanism to override values getting passed to `Threads.@spawn` / `Threads.@threads`? Maybe I just have to write a `BoundaryChecker.Threads.@spawn` that parses and wraps variables in `@take`? Though it seems a bit fragile this way.

Edit: will just manually check `.threadid == Threads.threadid()` each time anything is accessed.

---

_[View the full topic](https://discourse.julialang.org/t/package-for-rust-like-borrow-checker-in-julia/124442)._
