python-trio / python-trio/trio

Possible API breakers in ParkingLot

Open
#53 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design discussion potential API breaker
Dominant language
Python
Stars
7.3k
Forks
431
Avg merge
2d 17h
Merged PRs (30d)
6

Description

See the big comment at the top of the file.

In particular:

  • We might want to switch to a single global ParkingLot, in which case the API would shift quite a bit. (Instead of having ParkingLot objects, we'd have an argument which was an arbitrary id naming the synchronization object.)

  • If we implement WFQ (#32) then we'd probably need to stop returning the unparked tasks from unpark. (This would slightly complicate the implementation of RLock and Condition, but I don't think it's too bad.)

  • We might want to add a way for tasks to mark themselves when parking, but probably this could be done in a backwards compatible way.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the big comment at the top of the ParkingLot implementation, then review WFQ (#32) and the interactions with RLock and Condition. Clarify whether the global ParkingLot, unpark return-value, and task-marking proposals are intended, and document a decided API direction before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
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.