Briefing

Behavior-Oriented Concurrency in Python – BOC v0.5.0 Release

ai-dev
by mpweiher ·

Install bocpy v0.5.0 via pip and decorate your functions with @behavior to achieve lock‑free concurrency without manual synchronization.

What to do now

Install bocpy v0.5.0 and refactor critical sections to use BOC decorators, removing locks and simplifying concurrency logic.

Summary

Behavior‑Oriented Concurrency (BOC) is a new Python concurrency paradigm that eliminates locks by assigning each behavior a unique temporal ownership of shared data.

The latest release, v0.5.0, ships as the bocpy package and can be installed with pip install bocpy. In a BOC program, functions are decorated to become behaviors; the decorator handles scheduling and data flow, allowing the interpreter to run multiple behaviors in parallel without manual synchronization. The library promises lock‑less, deadlock‑free execution, and claims to unlock multi‑core performance by efficiently scheduling behaviors across processes. BOC was originally a core concept in the research language Verona, and the Python implementation brings those ownership‑based guarantees to mainstream developers. The API exposes a simple decorator syntax, a scheduler that can be configured for thread‑ or process‑based execution, and utilities for inspecting behavior ownership. The v0.5.0 release adds support for context‑aware ownership transfer, improved error reporting, and a lightweight KV cache for shared state. Developers can now refactor critical sections to use BOC decorators, reducing complexity and improving maintainability.

Key changes

  • Release v0.5.0 of bocpy, installable via pip.
  • Functions become behaviors through a decorator, eliminating manual locks.
  • Lock‑less, deadlock‑free execution with ownership‑based data flow.
  • Multi‑core performance via efficient scheduling across processes.
  • Context‑aware ownership transfer added in v0.5.0.
  • Improved error reporting and lightweight KV cache for shared state.
  • Scheduler configurable for thread‑ or process‑based execution.
  • API exposes simple decorator syntax and ownership inspection utilities.

Affects

internal

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting