anthonywilliams / ccia_code_samples

Code samples for C++ Concurrency in Action
690 stars 215 forks source link

fix listing 3.8 #3

Open yz1509 opened 5 years ago

yz1509 commented 5 years ago
void unlock()
    {
        if(this_thread_hierarchy_value!=hierarchy_value)
            throw std::logic_error("mutex hierarchy violated"); // missing
        this_thread_hierarchy_value=previous_hierarchy_value;
        internal_mutex.unlock();
    }
EMCP commented 3 years ago

why not submit this as a Pull Request ? I'm not following what was wrong

yz1509 commented 3 years ago

why not submit this as a Pull Request ? I'm not following what was wrong

ccia 2nd P59 line 3