$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [boost.thread] Documentation code error
From: Philip Bennefall (philip_at_[hidden])
Date: 2013-03-16 16:45:57
Hello,
In the chapter about synchronization in the boost.thread documentation, 
where the hello world example with the bank account is being shown, I see a 
small problem in the class:
    int GetBalance() {
        mtx_.lock();
        int b = balance_;
        mtx_.unlock();
        return balance_;
    }
I believe it should be:
    int GetBalance() {
        mtx_.lock();
        int b = balance_;
        mtx_.unlock();
        return b;
    }
Kind regards,
Philip Bennefall