Opened 10 years ago

Closed 9 years ago

#2985 defect closed fixed (fixed)

twisted.web.static.FileTransfer pointlessly uses threadable.synchronized

Reported by: Jean-Paul Calderone Owned by:
Priority: high Milestone:
Component: web Keywords:
Cc: Branch: branches/unsynchronized-2985
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

Description

FileTransfer should not bother to pretend to provide a threadsafe API. Synchronizing resumeProducing doesn't actually make it threadsafe to call self.request.write from another thread.

Change History (5)

comment:1 Changed 9 years ago by Jean-Paul Calderone

author: exarkun
Branch: branches/unsynchronized-2985

(In [23910]) Branching to 'unsynchronized-2985'

comment:2 Changed 9 years ago by Jean-Paul Calderone

Keywords: review added
Owner: jknight deleted

Removed, and did some other minor cleanups.

comment:3 Changed 9 years ago by therve

Keywords: review removed
Owner: set to Jean-Paul Calderone

Looks cool. There is a bunch of other cleanups which would be nice to make:

  • remove string import
  • remove future import
  • remove trailing whitespaces

Nothing mandatory though, so merge when you want.

comment:4 Changed 9 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [23946]) Merge unsynchronized-2985

Author: exarkun Reviewer: therve Fixes: #2985

Remove the code which synchronizes methods of FileTransfer. The methods aren't threadsafe even if they're guaranteed to be serialized.

Also make some minor cleanups to nearby code, removing trailing whitespace and no-longer needed imports.

comment:5 Changed 7 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.