
Robert Ramey wrote:
I'm going through the documentation and now have some questions. I would hope that the documentation could be expanded to include answers to these questions.
a) reference is made to a "lease" which sounds like a mutex to me. But its not obvious to me how this should be used. How does the compare with the pattern that I am more familiar with
class s : singlton mutex m_mutex ...
my_function(...){ scoped_lock(m_mutex); ... }
OK - I've looked again and I think its clear to me how this is to be used.
We need a tutorial here !!!!
b) reference is made to boost::restricted which I couldn't find anywhere.
c) the synopsis specifies static unspecified instance; But the Expression Symatics specifies D::instance->m which seems inconsistent to me. I Rather expect the synopsis to say D:instance.m or D::get_instance().m d) what about access to object which don't require thread locking - for example const members. Do they need locking/leasing also? I would guess not but? e) What does D::instance return ? a reference or pointer to the single instance of D or something else. I would expect the former, but the synopsis contains static "unspecified" instance rather than static T instance as I would expect. f) can "const" static objects be created? g) what happens if same interface used by different DLLS. Is one instance still created? Robert Ramey Robert Ramey