crossbario / crossbario/autobahn-python
Allow use of a global clock
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 768
- PR merge metrics
- No merged PRs in 30d
Description
Autobahn uses callLater at various places to issue calling of functions at a later time.
For efficiency reasons, users might want to use a global clock that operates at limited precision, but leads to less syscalls.
In Twisted, this can be done by (1000 Hz capped)
from twisted.internet.task import Clock, LoopingCall
clock = Clock()
LoopingCall(lambda: clock.advance(0.001)).start(0.001)
http://twistedmatrix.com/trac/browser/tags/releases/twisted-14.0.0/twisted/internet/task.py#L725
and then do clock.callLater instead of reactor.callLater.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names Autobahn's uses of callLater and the reactor.callLater API, and links to Twisted's task.py Clock and LoopingCall implementation. Start by locating the callLater entry points and their tests, then compare how a configurable global clock could be supplied. Done means users can select a lower-precision clock without breaking delayed calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100