John Madsen wrote:

> Starting from the smart_ptr headers (shared, scoped, and weak), I've
> created corresponding handle classes.  The motivation is to provide
> RAII semantics for handle based resources.  Windows' HANDLEs,
> FILE*s, and file descriptors are the most obvious examples.

[snip]

>
> I'd certainly love to hear ideas, criticism, etc. and ultimately see this
> become part of boost.


wouldn't deadlock detection be another application?  Taking the
definition directly from my "long-ago" OS course memory, a deadlock
occurs when one task or process holds a "handle" to a lock on a
resource required by another task, which in turn, holds another
"handle" to a lock on another resource required by first task.  If a
task cannot acquire the resource after a certain amount of time, it
might try to find whether another task is holding that resource.  Now,
if all the "handles" record their location in memory using Detlef's
method for smart pointers (and implemented in boost files under
shared_cyclic_ptr), wouldn't this make it possible for a task to do
this?


_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to