<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: lurker emerges --> <!--X-From-R13: Hnqvz Fxnpuraxb <igNserrubyq.pebpbqvyr.bet> --> <!--X-Date: Tue, 11 Aug 1998 21:33:55 -0700 --> <!--X-Message-Id: 35D11B21.FC30D79F#freehold,crocodile.org --> <!--X-Content-Type: text/plain --> <!--X-Reference: 199808111505.IAA07913#cashew,snugharbor.com.snugharbor.com --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, [MUD-Dev] Re: lurker emerges</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:vt#freehold,crocodile.org"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00675.html">Previous</a> | <a href="msg00677.html">Next</a> ] Thread: [ <a href="msg00658.html">Previous</a> | <a href="msg00656.html">Next</a> ] Index: [ <A HREF="author.html#00676">Author</A> | <A HREF="#00676">Date</A> | <A HREF="thread.html#00676">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>[MUD-Dev] Re: lurker emerges</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Subject</em>: [MUD-Dev] Re: lurker emerges</LI> <LI><em>From</em>: Vadim Tkachenko <<A HREF="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</A>></LI> <LI><em>Date</em>: Tue, 11 Aug 1998 23:33:37 -0500</LI> <LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> T. Alexander Popiel wrote: [skipped] > Unfortunately, I require (by my own free will, I'll admit) functionality > in non-threaded environments, so the portability doesn't hold for me. > However, we're just getting religious here, so I'll drop it. ;-) My fault - I'm getting picky with the *terms* to achieve the understanding, and usually forget to mention that upfront. > >nor Java semaphores (they don't exist there) > > *blink blink* > > I suppose not, in the strictest sense, but I use the following > construct all the time: > > Object sem = new Object(); > synchronized (sem) { > /* pass sem to some other thread */ > sem.wait(); > } > > ... > > /* some other thread */ > synchronized (sem) { sem.notify(); } > > Tastes like a semaphore to me. ;-) Looks like duck... :-)) In fact, yes, this is a mutex semaphore. As for event semaphores, it's slightly different, and I had my own ideas about the semantics, so I've implemented the sems in a pretty weird way. One of the goals I wanted to achieve is to create a multiple-wait semaphore, or semaphore group. It is possible to do this stuff in Java without any additions, too, but it's the pain in the neck. And, as a side effect, the observable/observer pattern applies here well, too. And the callbacks. And as it turned out, it was useful to implement even the mutex semaphores (though they _do_ exist as the synchronized access) just to make the design concept clearer. And to use them in the multiple-wait conditions. > - Alex -- Still alive and smile stays on, Vadim Tkachenko <vt#freehold,crocodile.org> -- UNIX _is_ user friendly, he's just very picky about who his friends are </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00658" HREF="msg00658.html">[MUD-Dev] Re: lurker emerges</A></STRONG> <UL><LI><EM>From:</EM> "T. Alexander Popiel" <popiel#snugharbor,com></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00675.html">[MUD-Dev] Re: DBMS in MU*'s</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00677.html">[MUD-Dev] Methods to Reduce Ecological Wipeout</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00658.html">[MUD-Dev] Re: lurker emerges</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00656.html">[MUD-Dev] Re: lurker emerges</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00676"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00676"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>[MUD-Dev] Re: lurker emerges</STRONG>, <EM>(continued)</EM> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <LI><strong><A NAME="00649" HREF="msg00649.html">[MUD-Dev] Re: lurker emerges</A></strong>, Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Tue 11 Aug 1998, 03:41 GMT <UL> <LI><strong><A NAME="00652" HREF="msg00652.html">[MUD-Dev] Re: lurker emerges</A></strong>, T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Tue 11 Aug 1998, 04:45 GMT <UL> <LI><strong><A NAME="00653" HREF="msg00653.html">[MUD-Dev] Re: lurker emerges</A></strong>, Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Tue 11 Aug 1998, 05:39 GMT <LI><strong><A NAME="00658" HREF="msg00658.html">[MUD-Dev] Re: lurker emerges</A></strong>, T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Tue 11 Aug 1998, 15:05 GMT <LI><strong><A NAME="00676" HREF="msg00676.html">[MUD-Dev] Re: lurker emerges</A></strong>, Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Wed 12 Aug 1998, 04:33 GMT </LI> </LI> </LI> <LI><strong><A NAME="00656" HREF="msg00656.html">[MUD-Dev] Re: lurker emerges</A></strong>, Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Tue 11 Aug 1998, 07:53 GMT </LI> </UL> </LI> <LI><strong><A NAME="00654" HREF="msg00654.html">[MUD-Dev] Re: lurker emerges</A></strong>, Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Tue 11 Aug 1998, 06:48 GMT </LI> </UL> </LI> </ul> </ul> </ul> </ul> <LI><strong><A NAME="00615" HREF="msg00615.html">[MUD-Dev] Re: lurker emerges</A></strong>, Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Mon 10 Aug 1998, 05:57 GMT </LI> </ul> </ul> <LI><strong><A NAME="00600" HREF="msg00600.html">[MUD-Dev] Re: lurker emerges</A></strong>, James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sun 09 Aug 1998, 23:54 GMT </LI> </ul> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>