<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh" -->

---
title: Lock Free Multi Core Performance with Behavior Oriented...
description: A Microsoft Research and Cambridge researcher introduces Behavior Oriented Concurrency (BoCo), a new concurrency paradigm implemented as the third-party 'bock'...
canonical: https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Lock Free Multi Core Performance with Behavior Oriented Concurrency - Mathew Johnson | daily.dev
og:description: A Microsoft Research and Cambridge researcher introduces Behavior Oriented Concurrency (BoCo), a new concurrency paradigm implemented as the third-party 'bock'...
og:url: https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh
og:image: https://api.daily.dev/og/posts/8OMDYSzuh.png
og:image:alt: Lock Free Multi Core Performance with Behavior Oriented Concurrency - Mathew Johnson
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Lock Free Multi Core Performance with Behavior Oriented Concurrency - Mathew Johnson

**[PyCon US](https://daily.dev/sources/pyconus)** · 29 min read · 0 upvotes · 0 comments

## Summary

A Microsoft Research and Cambridge researcher introduces Behavior Oriented Concurrency (BoCo), a new concurrency paradigm implemented as the third-party 'bock' Python module. It introduces 'cones' (temporal ownership of shared resources) and a 'when' decorator that schedules code snippets as behaviors, guaranteeing no data races and no deadlocks by construction. Built on Python's sub-interpreters and cross-interpreter data API, it works on Python 3.10 through 3.15, but only delivers real multi-core speedup from 3.12 onward. The talk walks through the Boids simulation and dining philosophers problem as examples, discusses performance bottlenecks around serialization, and previews future work including PEP 795 (deep immutability) and a 'regions' concept for zero-copy sharing across interpreters. The module is already compatible with free-threaded Python builds.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=LytoGIXLYkY>

## Questions this post answers

### What is Behavior Oriented Concurrency and how does the bock Python module prevent deadlocks and data races?

Behavior Oriented Concurrency (BoCo) is a concurrency model built around two primitives: cones, which give unique temporal ownership of a shared resource to one thread at a time, and behaviors, code snippets scheduled to run only when their required cones are available. Because a behavior gets exclusive access to all its cones when it runs, data races are impossible, and the scheduler is designed so behaviors can never deadlock, unlike traditional lock-based code.

_Developers weighing lock-based threading against newer concurrency models can track approaches like this on daily.dev._

### Which Python versions does the bock module support and when do you get multi-core performance gains?

The bock module runs on Python 3.10 through 3.15, but only Python 3.12 and later deliver real multi-core performance because that is when the sub-interpreters and multi-GIL infrastructure it depends on becomes fully usable. On 3.10 and 3.11 the code still runs correctly, but without any concurrency speedup and possibly slightly slower.

_Anyone planning a Python version upgrade for concurrency gains can follow changes like this on daily.dev._

### What is the performance bottleneck in Python's cross-interpreter data API and how can it be avoided?

Serialization and deserialization through the cross-interpreter data (XIData) API is the main bottleneck for tools like bock that share objects between sub-interpreters, particularly when a large object graph is passed but little work is done with it. This cost can be reduced with custom pickling routines, or by registering a C extension type with the XIData interface as a known type for large performance gains.

_Teams optimizing sub-interpreter or multi-core Python workloads can keep up with fixes like this on daily.dev._

## Similar posts on daily.dev

- [Free-Threaded Python Post-Era \(Python Language Summit 2026\)](https://daily.dev/posts/free-threaded-python-post-era-python-language-summit-2026--rf4hcywhp) · Python Insider · 4 upvotes · 1 comments
- [GitHub - b-erdem/lockstep: Coyote-style controlled concurrency testing for the BEAM](https://daily.dev/posts/github---b-erdem-lockstep-coyote-style-controlled-concurrency-testing-for-the-beam-gmvbpycj5) · ElixirStatus · 0 upvotes · 0 comments
- [The Staggering Complexity And Subtlety Of Concurrency](https://daily.dev/posts/the-staggering-complexity-and-subtlety-of-concurrency-e4mpqhp2q) · Hackaday · 1 upvotes · 0 comments
- [Speed Up Python With Concurrency Quiz – Real Python](https://daily.dev/posts/speed-up-python-with-concurrency-quiz-real-python-ig6gvptoi) · Real Python · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#cpython](https://daily.dev/tags/cpython)

[View this post on daily.dev](https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Lock Free Multi Core Performance with Behavior Oriented Concurrency - Mathew Johnson","url":"https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh"},"datePublished":"2026-08-25T18:58:23.727Z","dateModified":"2026-08-25T18:58:56.067Z","description":"A Microsoft Research and Cambridge researcher introduces Behavior Oriented Concurrency (BoCo), a new concurrency paradigm implemented as the third-party 'bock'...","image":"https://i.ytimg.com/vi/LytoGIXLYkY/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/LytoGIXLYkY/sddefault.jpg","isAccessibleForFree":true,"articleSection":"PyCon US","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"PyCon US","logo":"https://media.daily.dev/image/upload/s--DLedNxG1--/f_auto,q_auto/v1777800767/logos/pyconus?_a=BAMAMiWQ0","url":"https://daily.dev/sources/pyconus"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,cpython","timeRequired":"PT29M","video":{"@type":"VideoObject","name":"Lock Free Multi Core Performance with Behavior Oriented Concurrency - Mathew Johnson","description":"A Microsoft Research and Cambridge researcher introduces Behavior Oriented Concurrency (BoCo), a new concurrency paradigm implemented as the third-party 'bock'...","thumbnailUrl":"https://i.ytimg.com/vi/LytoGIXLYkY/sddefault.jpg","uploadDate":"2026-08-25T18:58:23.727Z","duration":"PT29M","url":"https://api.daily.dev/r/8OMDYSzuh","embedUrl":"https://www.youtube.com/embed/LytoGIXLYkY"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"PyCon US","item":"https://daily.dev/sources/pyconus"},{"@type":"ListItem","position":3,"name":"Lock Free Multi Core Performance with Behavior Oriented Concurrency - Mathew Johnson"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/lock-free-multi-core-performance-with-behavior-oriented-concurrency---mathew-johnson-8omdyszuh#faq","mainEntity":[{"@type":"Question","name":"What is Behavior Oriented Concurrency and how does the bock Python module prevent deadlocks and data races?","acceptedAnswer":{"@type":"Answer","text":"Behavior Oriented Concurrency (BoCo) is a concurrency model built around two primitives: cones, which give unique temporal ownership of a shared resource to one thread at a time, and behaviors, code snippets scheduled to run only when their required cones are available. Because a behavior gets exclusive access to all its cones when it runs, data races are impossible, and the scheduler is designed so behaviors can never deadlock, unlike traditional lock-based code. Developers weighing lock-based threading against newer concurrency models can track approaches like this on daily.dev."}},{"@type":"Question","name":"Which Python versions does the bock module support and when do you get multi-core performance gains?","acceptedAnswer":{"@type":"Answer","text":"The bock module runs on Python 3.10 through 3.15, but only Python 3.12 and later deliver real multi-core performance because that is when the sub-interpreters and multi-GIL infrastructure it depends on becomes fully usable. On 3.10 and 3.11 the code still runs correctly, but without any concurrency speedup and possibly slightly slower. Anyone planning a Python version upgrade for concurrency gains can follow changes like this on daily.dev."}},{"@type":"Question","name":"What is the performance bottleneck in Python's cross-interpreter data API and how can it be avoided?","acceptedAnswer":{"@type":"Answer","text":"Serialization and deserialization through the cross-interpreter data (XIData) API is the main bottleneck for tools like bock that share objects between sub-interpreters, particularly when a large object graph is passed but little work is done with it. This cost can be reduced with custom pickling routines, or by registering a C extension type with the XIData interface as a known type for large performance gains. Teams optimizing sub-interpreter or multi-core Python workloads can keep up with fixes like this on daily.dev."}}]}
```

