twisted / twisted/twisted

No-op timer service in _twistw.py is (probably) unnecessary

Open
#1,764 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core enhancement new priority-low twistd win32
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

soyt's avatar soyt reported
Trac ID trac#1764
Type enhancement
Created 2006-05-30 10:19:39Z

I have raised that point on the mailing-list some time ago, but I think it deserves a ticket, for the record.

tw.scripts._twistw.runApp adds a no-op timer service to the application, to pretend that the select reactor can be interrupted by Ctrl-C.
But tw.internet.selectreactor already wraps the select call to circumvent this win32 malfunction, among others.

So the extra service is unnecessary. Furthermore, it is added
unconditionally, even if the installed reactor does not actually
need it (I don't know much about IOCP, but maybe it does not). It might not have a huge performance impact, but correctness does not hurt I guess.

Attachments:

Searchable metadata
trac-id__1764 1764
type__enhancement enhancement
reporter__soyt soyt
priority__low low
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__win32_twistd win32 twistd
time__1148984379000000 1148984379000000
changetime__1279124644000000 1279124644000000
version__None None
owner__zseil zseil
cc__teratorn cc__zseil

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

Start with tw.scripts._twistw.runApp and the no-op timer service, then read tw.internet.selectreactor to understand the existing select-call workaround. Review the attached remove-twistd-time-service.patch and verify whether the service can be removed without affecting Ctrl-C behavior or reactors that may need it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.