<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have a resource that I only want to be
used by one process at a time. I've created a ResourceManager class to
encapsulate this policy.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>ResourceManager>>doWithResource:
aOneArgumentBlock</FONT></DIV>
<DIV><FONT face=Arial size=2> mutexSemaphore critical:
[aOneArgumentBlock value: myResource]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Only one process can be using the resource
"myResource" at a time. Do I have that right? </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The problem I have is that if I leave my program
running for a few days, I invariably find it hung, waiting to execute a critical
section. I don't see any debugger window popping up, so no error was
encoutered. Does that mean that one of my blocks that I'm passing in is
never finishing?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Derek Brans<BR>Nerd on a Wire<BR>Web design that's
anything but square<BR><A
href="http://www.nerdonawire.com">http://www.nerdonawire.com</A> <BR>mailto: <A
href="mailto:brans@nerdonawire.com">brans@nerdonawire.com</A><BR>phone:
604.874.6463<BR>toll-free: 1-877-NERD-ON-A-WIRE</FONT></DIV></BODY></HTML>