Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
May 16, 2009 [Issue 2992] New: std.typecons has unnecessary thread local globals | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2992 Summary: std.typecons has unnecessary thread local globals Product: D Version: 2.030 Platform: PC OS/Version: Linux Status: NEW Keywords: performance Severity: normal Priority: P2 Component: Phobos AssignedTo: bugzilla@digitalmars.com ReportedBy: jason.james.house@gmail.com CC: jason.james.house@gmail.com The following is the offending code: static string toStringHeader = Tuple.stringof ~ "("; static string toStringFooter = ")"; static string toStringSeparator = ", "; The variables should be declared invariant -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 16, 2009 [Issue 2992] std.typecons has unnecessary thread local globals | ||||
---|---|---|---|---|
| ||||
Posted in reply to jason.james.house@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=2992 --- Comment #1 from Jason House <jason.james.house@gmail.com> 2009-05-16 10:55:25 PDT --- On second thought, this may be an undocumented "feature" that allows changing how output formatting is handled. If that's true, the nature of this bug report is really much different. Use of globals for that purpose leaves residual side effects that can affect other calls to the function that expect/require normal handling. There are two basic options: 1. There should be a formatter struct that stores the customized state (the default free functions could simply call the formatting functions of the struct on an invariant global formatting struct. 2. Put these formatting arguments as default parameters on calls that use them -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 18, 2009 [Issue 2992] std.typecons has unnecessary thread local globals | ||||
---|---|---|---|---|
| ||||
Posted in reply to jason.james.house@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=2992 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrei@metalanguage.com --- Comment #2 from Andrei Alexandrescu <andrei@metalanguage.com> 2009-05-17 19:56:20 PDT --- (In reply to comment #1) > On second thought, this may be an undocumented "feature" that allows changing > how output formatting is handled. If that's true, the nature of this bug > report is really much different. Use of globals for that purpose leaves > residual side effects that can affect other calls to the function that > expect/require normal handling. There are two basic options: > 1. There should be a formatter struct that stores the customized state (the > default free functions could simply call the formatting functions of the struct > on an invariant global formatting struct. > 2. Put these formatting arguments as default parameters on calls that use them Yes, the plan was to allow people who prefer a different formatting to simply change the globals. I'm undecided how to proceed about this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
May 18, 2009 [Issue 2992] std.typecons has unnecessary thread local globals | ||||
---|---|---|---|---|
| ||||
Posted in reply to jason.james.house@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=2992 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|bugzilla@digitalmars.com |andrei@metalanguage.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 28, 2009 [Issue 2992] std.typecons has unnecessary thread local globals | ||||
---|---|---|---|---|
| ||||
Posted in reply to jason.james.house@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=2992 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |LATER --- Comment #3 from Andrei Alexandrescu <andrei@metalanguage.com> 2009-08-27 19:28:25 PDT --- I will close this bug for the time being. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 06, 2009 [Issue 2992] std.typecons has unnecessary thread local globals | ||||
---|---|---|---|---|
| ||||
Posted in reply to jason.james.house@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=2992 HOSOKAWA Kenchi <hskwk@inter7.jp> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hskwk@inter7.jp --- Comment #4 from HOSOKAWA Kenchi <hskwk@inter7.jp> 2009-10-05 22:31:17 PDT --- (In reply to comment #2) > Yes, the plan was to allow people who prefer a different formatting to simply change the globals. I'm undecided how to proceed about this. These lines give me annoying compiler warnings with -vtls switch. At least these global variables should be qualified as __gshared, according to "Migrating to Shared" guideline. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 25, 2013 [Issue 2992] std.typecons has unnecessary thread local globals | ||||
---|---|---|---|---|
| ||||
Posted in reply to jason.james.house@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=2992 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich@gmail.com Resolution|LATER |WORKSFORME --- Comment #5 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-25 07:16:23 PST --- They're now manifest constants. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation