Primary Concurrency Model: Threading Support with mcrfpy.lock() #219
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#220 Secondary Concurrency Model: Subinterpreter Support
john/McRogueFace
Reference
john/McRogueFace#219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Primary Concurrency Model: Threading Support
Enable background Python threads to run concurrently with the render loop, with a synchronization primitive for safe UI updates.
Motivation
Currently, all Python code (timers, input handlers, scene.update) runs synchronously on the render thread, blocking rendering. This prevents:
Design
Core Principle
mcrfpy.lock()context manager for synchronized frame-boundary updatesmcrfpy.lock()SemanticsRender Loop Integration
C++ FrameLock Implementation
Implementation Tasks
FrameLockclass to GameEnginemcrfpy.lock()Python context managerThread Safety Notes
User responsibilities:
mcrfpy.lock()Engine guarantees:
mcrfpy.lock()blocks execute sequentially with frame processingExample: Web Server