GothenburgBitFactory / GothenburgBitFactory/taskchampion-py

Drop the GIL while running sync

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
5
PR merge metrics
No merged PRs in 30d

Description

A sync may take a while, but doesn't touch anything accessible from Python. We could [drop the GIL](https://pyo3.rs/v0.23.3/parallelism.html) while syncing!

Since Replica is currently not Send (#25), this would be safe: no other thread can call a method on a Replica while the sync is ongoing, since it is using the only thread allowed to do so.

However, if we ever drop that restriction then we'd need to add some other kind of mutual exclusion to ensure the Replica isn't modified while `sync` is running. So, I'm not sure it's a good idea to drop the GIL just yet.

If someone has a case for doing so, please comment here.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named. Start by reading the linked PyO3 parallelism guidance and issue #25, then determine whether releasing the GIL during sync is safe under Replica's current non-Send restriction. The issue does not define an implementation or completion criteria; it currently requests a case for doing so.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.