On Sat, 8 Feb 2003, Eric Hodel wrote:

> > class DistributedObject
> >   def method
> >     Thread.pass while sem.try_lock
> >     yield
> >     ensure
> >       sem.unlock
>         ^^^

> Where is this getting locked?

from the pickaxe :

try_lock : ref.try_lock -> true or false

   Attempts to obtain the lock and
   returns immediately. Returns true if
   the lock was granted.

so the thread yield control until the lock is granted.

> You could install a signal handler that would unlock the Mutex, but I'm
> not sure how much work would be involved to make it always do the right
> thing, as you need to know that _you_ locked it and not some other
> client (this may or may not be a problem)

this is not possible for the reasons you mention.

> Why are you getting the sigabrt, anyway?

because i am doing a 'ctrl-c' from the client tty.  i am trying to make my
class super bomber.  with this exception - it seems to be.

in general, i am trying to learn what happens in a drb server when a client
aborts or is otherwise terminated prematurely (eg. before the method has
finished completing)

-a

>
> --=20
> Eric Hodel - drbrain / segment7.net - http://segment7.net
> All messages signed with fingerprint:
> FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04
>
>
> --lBR2yNlwcY132B3M
> Content-Type: application/pgp-signature
> Content-Disposition: inline
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.0 (FreeBSD)
>
> iD8DBQE+Q9xuMypVHHlsnwQRAggbAJ9MZT4CUCRPmCqiUR9jY6TGtd3TNgCbBeqo
> POIOV/XIRGZP2T4LWPu728Y=
> =P39E
> -----END PGP SIGNATURE-----
>
> --lBR2yNlwcY132B3M--
>
>

-- 

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328
 | Email: ahoward / fsl.noaa.gov
 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================