MLX new_thread_unsafe_stream API and Swift concurrency use
Parent: Mac local LLMs: MLX kernels, numerics and internals · Published reference · snapshot 2026-10-05
↓ Facts as markdownall context files
The PR text says the streams "can be freely passed to and evaluated on any thread" with no MLX synchronization, and that it gives language bindings such as Swift a way to evaluate graphs asynchronously through threads provided they add their own locks.
These notes link each claim to its source. A source may be a research report hosted on this site rather than the primary document. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Facts
- The PR text says the streams "can be freely passed to and evaluated on any thread" with no MLX synchronization, and that it gives language bindings such as Swift a way to evaluate graphs asynchronously through threads provided they add their own locks. [source]
- The author hopes fully thread-safe streams later let the API be removed, but calls that "very tricky". [source]
- PR 3578 was opened 2026-05-21 by zcbenz, force-pushed twice (to ddd7b95 on 2026-05-22 and 0f1191e on 2026-06-17), approved by angeloskath on 2026-06-16 ("Looks great!") and merged 2026-06-17 as commit 693ed59. [source]
- mlx-swift maintainer davidkoski cross-referenced it on 2026-06-04 from mlx-swift issue 407 (check_error() throws std::runtime_error from a completion handler, SIGABRT on iPhone 15 Pro, iOS 26.4, Qwen3 1.7B 4-bit). [source]
- No mlx-swift release or adoption of the API was found in sources read. [source]
- PR 3578 targets Swift-style concurrency where evaluation moves between threads, with locking left to the caller. [source]
- PR 3578 merged as commit 693ed59 on 2026-06-17 after angeloskath's approval on 2026-06-16. [source]
- mlx-swift issue 407 (completion-handler SIGABRT) was linked to PR 3578 by davidkoski on 2026-06-04. [source]
- The API is described by its author as a stopgap pending true thread-safe streams. [source]
Children
- No children recorded.