Locking seems wrong in base_report_to_printer's update()

Bug #1308635 reported by Lionel Sausin - Numérigraphe on 2014-04-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Report - Printing and Sending
Undecided
Numérigraphe

Bug Description

Please forgive me if I'm wrong, but the locking in printing.printer.update() looks wrong to me, as it made around variable assignments.
If I'm not mistaken, that does not protect us from concurrent changes anyway :
- if what we read is immutable than the value is copied and locking is unnecessary
- if it's mutable then we're getting a "reference" to the shared object, and should keep the lock until we're completely done with it

From my quick code survey, the variables seem to contain a boolean and a float so I guess no locking is needed.

Related branches

Changed in report-print-send:
assignee: nobody → Numérigraphe (numerigraphe-team)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers