How does one go about making a class that is thread safe?
Say we created the simple animal class
how do i go about to ensure that this class is thread safe.
I am new to the multi-threading subject.
Thanks.
Say we created the simple animal class
Code:
class animal { public: virtual void eat() const { cout << " I eat like an animal. " << endl; } virtual ~animal() { } }
I am new to the multi-threading subject.
Thanks.
Comment