1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Event handling (was: request for comments) -->
<!--X-From-R13: f001tzhNabin.jevtug.rqh -->
<!--X-Date: Mon, 12 Jan 1998 14:41:01 +0000 -->
<!--X-Message-Id: Pine.PMDF.3.95.980112092757.543169343A&#45;100000#nova,wright.edu -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199801112109.NAA04638#under,Eng.Sun.COM -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Event handling (was: request for comments)</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:s001gmu#nova,wright.edu">
</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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00208.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00210.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00198.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00222.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00209">Author</A>
&nbsp;|&nbsp;<A HREF="#00209">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00209">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Event handling (was: request for comments)</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Event handling (was: request for comments)</LI>
<LI><em>From</em>: <A HREF="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</A></LI>
<LI><em>Date</em>: Mon, 12 Jan 1998 09:41:32 -0500 (EST)</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>

On Sun, 11 Jan 1998, JC Lawrence wrote:

&gt; On Fri, 9 Jan 1998 15:00:37 PST8PDT 
&gt; Vadim Tkachenko&lt;vadimt#4cs,com&gt; wrote:
&gt; 
&gt; &gt; But once again, I emphasize, the difference is between treating
&gt; &gt; everything as EVENTS and PROCESSES.
&gt; 
&gt; Note: "event" is actually a very poor term for what we are describing
&gt; here.  They really aren't events, but I'm unsure of a better name for
&gt; them.  

Actions?   

&gt; What is the difference between your model of a "process", and a paced
&gt; series of events such as one that:
&gt; 
&gt;   1) Dig portion of Panama Canal
&gt;   2) Log new event to dig portion of Panama Canal in X time.
&gt;   3) Exit
&gt; 
&gt; Where little tiny events are chained thru time to create the apparency
&gt; of an ongoing process?  (You could consider each #1 above as say the
&gt; moving of one shovel of dirt).
&gt;   
&gt; &gt; No, as a process - even in case when, say, your limb got cut off -
&gt; &gt; there's an open wound, which may not kill you immediately, but,
&gt; &gt; nevertheless, real soon unless you move your ...
&gt; 
&gt; Certainly.  You create an event chain (as above) which iteratively saps
&gt; the character's strength and vitality.  Should that process happen to
&gt; kill the character (strength == 0?) then this will be noticed by the
&gt; normal methods of the character object (probably in the accessor for
&gt; the strength attribute) and processed from there.

As I understand it, the only difference is that he shortcuts the event
chain by having the running thread (process in his terms) handle all of
the delays by going to sleep, rather than scheduling a new event to go off
X ticks down the road.

There are some advantages to doing it that way... You can have the thread
sleep by using pthread_cond_timedwait (assuming you are using posix
threads) , and use the condition var as an interrupt signal, allowing for
very gracefull interruption and interrupt handling.  If you want to
interrupt a pending event in an event queue, you have to search the queue,
or have some kludgy structure imposed above the queue to allow for easier
access, etc.

-Greg


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00245" HREF="msg00245.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>
<ul compact><li><em>From:</em> JC Lawrence &lt;claw#under,Eng.Sun.COM&gt;</li></ul>
<li><strong><A NAME="00222" HREF="msg00222.html">[MUD-Dev]  Event handling - some definitions</A></strong>
<ul compact><li><em>From:</em> "Jon A. Lambert" &lt;jlsysinc#ix,netcom.com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00198" HREF="msg00198.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></STRONG>
<UL><LI><EM>From:</EM> JC Lawrence &lt;claw#under,Eng.Sun.COM&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00208.html">Re: [MUD-Dev]  OT: DCOM and RMI</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00210.html">Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00198.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00222.html">[MUD-Dev]  Event handling - some definitions</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00209"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00209"><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>Re: [MUD-Dev]  Event handling (was: request for comments)</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00143" HREF="msg00143.html">Re: [MUD-Dev]  Event handling (was: request for comments)</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Fri 09 Jan 1998, 17:50 GMT
<UL>
<LI><strong><A NAME="00153" HREF="msg00153.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 09 Jan 1998, 21:51 GMT
<UL>
<LI><strong><A NAME="00155" HREF="msg00155.html">Re: [MUD-Dev]  Event handling (was: request for comments)</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Fri 09 Jan 1998, 23:03 GMT
<UL>
<LI><strong><A NAME="00198" HREF="msg00198.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sun 11 Jan 1998, 21:09 GMT
<LI><strong><A NAME="00209" HREF="msg00209.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 12 Jan 1998, 14:41 GMT
<LI><strong><A NAME="00222" HREF="msg00222.html">[MUD-Dev]  Event handling - some definitions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 13 Jan 1998, 00:55 GMT
</LI>
<LI><strong><A NAME="00245" HREF="msg00245.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Fri 16 Jan 1998, 04:31 GMT
<LI><strong><A NAME="00246" HREF="msg00246.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 16 Jan 1998, 15:35 GMT
</LI>
</LI>
</LI>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00195" HREF="msg00195.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sun 11 Jan 1998, 20:44 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</ul>
</ul>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>