Re: Why can't you define a variable as public within the Main() method?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Saved me a job... the reason I mention it is that of course both
methods are now reading/updating the same "variable" (field). This can
be very bad and confusing in many scenarios (particularly threading),
but very elegant and tidy in others. Use with caution (esp. when
threading), but worth knowing about. I think it would be a lousy
solution to the OP's question, but worth mentioning for completeness.

Marc


.



Relevant Pages

  • Re: Unitrack removal / strip-down?
    ... a decent threading newsreader (and google does threading ... Secondly, your original message was *very* carefully snipped by Alex, ... Hence me calling you a tit. ... I have no issues with the name calling it was the reason it was ...
    (uk.rec.motorcycles)
  • Re: ports and -current
    ... : On Sat, 20 Sep 2003, M. Warner Losh wrote: ... :> Maybe I missed the reason why FreeBSD needs to be unique wrt threading ... How FreeBSD causes that to ... this trivial reason. ...
    (freebsd-current)
  • Re: threads, signals, and atomicity of basic types
    ... orthogonal) threading standard. ... Except threading doesn't work that way. ... I think I can enlighten you somewhat: The reason why I ... keep pointing out that volatile is not related to threading, ...
    (comp.unix.programmer)
  • Re: Threading Concept in Linux....?
    ... One reason for this is that concepts like select or poll are hardly known. ... Threading is a performance hack. ... (The Art of Unix Programming by Eric S. Raymond) ...
    (comp.os.linux.embedded)
  • Re: Worse then useless replies
    ... And nobody was "bitching about it for no apparent reason". ... Most MUAs /don't/ do threading (For example, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)