• Deja vu (unregistered)

    At Buenos Aires, Argentina, Federal Office Dept., they have the same system for passports request. Maybe the same software? :-/

  • Dave C. (unregistered)
    /* existing code here */

    That's brilliant! I can just put EnterCriticalSection as the first line and LeaveCriticalSection as the last line of main() and never have concurrency problems anywhere in my program again!

  • ebg (unregistered) in reply to James
    As for whether or not RAII is a good idea -- if it's not in Stroustrup's book, it's a trick. This does *not* mean you can't use it, or that using it is a WTF, but it does merit at least a few words of comment.

    Actually it is in appendix E of the special addition, and Stroustrup cites the technique as a reason that C++ doesn't need the finally keyword: http://www.research.att.com/~bs/bs_faq2.html#finally

  • Michael J Smith (unregistered)

    Despite the questionable use of the Critical Section variable, there is a bigger problem.

    (I'm speaking Windows-Speak here - *nix people will recognize the words, it will sound gobbledygook as the non-Windows world uses different definitions).

    A critical section only protects you from a collision with another thread in the same process.

    We don't know enough about the architecture of the system, but it is probably multi-process.

    A Mutex will work for multiple processes on a single system, while something more complex is required if the display is a network resource.

    Ideally, a server would receive messages from various clients and queue them for the display device. This does not appear to be happening, given the current failure mode.

Leave a comment on “Race and Government”

Log In or post as a guest

Replying to comment #:

« Return to Article