Re: Lets hope easier multi-threaded programming gets on the RoadMap



On Sat, 03 Mar 2007 09:52:22 -0600, Charles McAllister wrote:

the most basic thing that would be useful (to me) would be an
optional compiler warning which would identify sections of code
that were not thread safe. for instance, i can go through this
process manually, and place critical sections around references to
global variables -- But, what's to stop a junior programmer from
writing code later that references those global variables without
going through critical sections.
Technically this is difficult any variable reference is not threadsafe
with the exception of variables defined in a procedure.

Also how do you know what has been protected? The only way to know if
code in subroutines has been protected is by doing static analysis.

--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
.



Relevant Pages

  • Re: static variables discarded by the VS.NET2003 linker
    ... an object file containing definitions of global variables of any type/ ... I simply added artificial references to the code, ... because both have back references and the linker would thus try to include ...
    (microsoft.public.vc.language)
  • Re: Unblessed reference.
    ... are returning references to references. ... in a variable of the worksheet object. ... sub create_excel_file { ... If you have groups of global variables specific to each other, ...
    (comp.lang.perl.misc)
  • Re: A thread safety question
    ... global variables are not thread safe. ... same in c# as in java or most other languages for that matter. ... > I also declare global variables and properties on pages themselves. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Thread-Safety in Functions: A Random String Generator
    ... > I was told using static and global variables ... and the first thread executes srand() but, ... (and function libraries that are not thread safe). ...
    (comp.lang.c)
  • Re: Case keeps changing
    ... Check the list of references. ... Another thing is to check global variables and try changing the ... and use case sensitive search, and replace the lower case version with the ... upper case version. ...
    (microsoft.public.vb.general.discussion)