Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-07-28
02:00 • Ticket [1077229fff] tcl_precision mutex status still Closed with 4 other cha... artifact: ab27e9f26b user: dgp
02:00 • Ticket [1077229fff]: 4 changes artifact: e6bc2d0cf6 user: dgp
01:59 • Add attachment 1077229.patch to ticket [1077229fff] artifact: 3b0e79b1f8 user: dgp
01:59 • Ticket [1077229fff] tcl_precision mutex status still Closed with 2 other cha... artifact: 66ac8055aa user: dgp
01:59 • Ticket [1077229fff]: 5 changes artifact: 9f30efb4cc user: dgp
01:59 • Closed ticket [1077229fff]. artifact: 1fa5a83029 user: dgp
2005-07-08
00:07 • Ticket [1077229fff]: 4 changes artifact: ea21654d38 user: dgp
00:07 • Ticket [1077229fff]: 4 changes artifact: 856d0bbb65 user: dgp
00:01 • Ticket [1077229fff]: 4 changes artifact: e50e978ea5 user: dgp
2005-07-07
23:59 • Ticket [1077229fff]: 4 changes artifact: 44db2990ed user: dgp
2005-07-06
22:24 • Ticket [1077229fff]: 4 changes artifact: be39eacc82 user: dgp
22:24 • Ticket [1077229fff]: 1 change artifact: 0c8d83df9a user: dgp
2005-04-19
22:19 • Ticket [1077229fff]: 5 changes artifact: f3c6cb87e1 user: kennykb
2005-03-25
22:43 • Ticket [1077229fff]: 5 changes artifact: a5b5e95416 user: dgp
2004-12-02
01:10 • New ticket [1077229fff]. artifact: dbe27ecf68 user: dgp

tcl_precision mutex

Closed / Accepted1077229fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 21 years ago
Descriptionplain2004-12-02 01:10:24
consider storing the shared
tcl_precision value as a
ProcessGlobalValue.
dgpplain2005-03-25 22:43:40
Logged In: YES 
user_id=80530


I'd like your comment on this,
and on the related idea of 
storing tcl_precision per-interp
instead of sharing app-wide.
kennykbplain2005-04-19 22:19:21
Logged In: YES 
user_id=99768

Storing tcl_precision per-interp rather than
process wide doesn't work, because Tcl_PrintDouble
doesn't take an interp as a parameter.  Alas.
dgp Ticket [1077229fff]: 1 change [History diff]2005-07-06 22:24:39
dgpplain2005-07-06 22:24:40
Logged In: YES 
user_id=80530


how about storing tcl_precision
per-thread rather than app-wide?

Almost seems that we have to do
that, or else the whole process
of formatting doubles is not
"thread-safe" in a rather important
sense.
dgpplain2005-07-07 23:59:22
Logged In: YES 
user_id=80530


ummm.... FWIW, Tcl_PrintDouble
*does* appear to accept an interp
argument.
dgpplain2005-07-08 00:01:08
Logged In: YES 
user_id=80530


...though T_PD must handle,
and most often sees, a value
of interp == NULL passed in.
dgpplain2005-07-08 00:07:24
Logged In: YES 
user_id=80530


Attached patch makes the
tcl_precision a per-thread value.

Advantage is that surprises like

    set tcl_precision 5
    <another thread sets tcl_precision to something else>
    puts $myDouble

are avoided.

Disadvantage is those misquided souls
who believe they want a different value
of tcl_precision that the default (0) now
have to set it in each thread, not just
once per app.

please review
dgpplain2005-07-08 00:07:26
File Added - 141223: 1077229.patch
dgp Closed ticket [1077229fff]. [History diff]2005-07-28 01:59:53
dgpplain2005-07-28 01:59:54
Logged In: YES 
user_id=80530


Committing updated patch to HEAD.
dgp Ticket [1077229fff]: 2 changes [History diff]2005-07-28 01:59:56
dgpplain2005-07-28 02:00:02
File Added - 143518: 1077229.patch
dgpplain2005-07-28 02:00:04
File Deleted - 141223:
Log in (anonymous is fine) to add a comment.

Attachments: