summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-29 20:38:10 +0000
committerjcej <jcej@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-29 20:38:10 +0000
commit0399c1376f5efa8e6d75280723dbeefe87fb5436 (patch)
treee5d248f00dcfe5ef29bce866b5cf17dc0e92189b
parent4ec7558319e82ee745f1835dcd6621f557e00c15 (diff)
downloadATCD-0399c1376f5efa8e6d75280723dbeefe87fb5436.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98b8
-rw-r--r--docs/tutorials/006/client_handler.h3
-rw-r--r--docs/tutorials/007/page01.html2
-rw-r--r--docs/tutorials/007/page09.html25
4 files changed, 34 insertions, 4 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b
index af12efec54f..b07e9bdfeab 100644
--- a/ChangeLog-98b
+++ b/ChangeLog-98b
@@ -1,3 +1,11 @@
+1998-11-29 James CE Johnson <jcej@chiroptera.tragus.org>
+
+ * docs/tutorials/007/page09.html:
+ Added warnings about a possible core dump when an event handler
+ exists in the thread pool's message queue after the handler has
+ been destroyed. Jeff Donner's <JDonner@schedsys.com> work with
+ Tutorial 007 on Win32 lead to this discovery.
+
Sat NOv 28 20:02:08 1998 Kirthika Parameswaran <kirthika@cs.wustl.edu>
* examples/DLL/Today.cpp:
diff --git a/docs/tutorials/006/client_handler.h b/docs/tutorials/006/client_handler.h
index c4b2fe4d8b0..c1c1d534a32 100644
--- a/docs/tutorials/006/client_handler.h
+++ b/docs/tutorials/006/client_handler.h
@@ -84,7 +84,8 @@ public:
for the object on the mask that caused the -1 return. This means
that we don't have to do that ourselves!
*/
- int handle_close (ACE_HANDLE _handle, ACE_Reactor_Mask _mask);
+ virtual int handle_close (ACE_HANDLE _handle = ACE_INVALID_HANDLE,
+ ACE_Reactor_Mask _mask = ACE_Event_Handler::ALL_EVENTS_MASK );
protected:
diff --git a/docs/tutorials/007/page01.html b/docs/tutorials/007/page01.html
index 9402426de3f..24b94f686c7 100644
--- a/docs/tutorials/007/page01.html
+++ b/docs/tutorials/007/page01.html
@@ -17,7 +17,7 @@
<HR WIDTH="100%">
<P>In this tutorial, we're going to extend Tutorial 6 to add a third concurrency
-strategy:&nbsp; thread-pool.&nbsp; Like Tutorail 6 did to Tutorial 5, we're
+strategy:&nbsp; thread-pool.&nbsp; Like Tutorial 6 did to Tutorial 5, we're
going to keep the existing strategies that we've already created and add
this one in as a "bonus".&nbsp; As you'll see, our basic objects will change
but not by a whole lot.&nbsp; To accomplish this, we'll introduce one new
diff --git a/docs/tutorials/007/page09.html b/docs/tutorials/007/page09.html
index af87b79444c..00e9ff650b5 100644
--- a/docs/tutorials/007/page09.html
+++ b/docs/tutorials/007/page09.html
@@ -53,8 +53,29 @@ to include it here.
<LI>
<A HREF="fix.Makefile">fix.Makefile</A></LI>
</UL>
-&nbsp;
-
+<P>
+<HR WIDTH="100%">
+<P>
+<center><h2>Danger, Warning!</h2></center>
+Now that I've gone through all of this to create a thread pool server,
+I have to point out that this isn't exactly the best or safest way to
+do so. The biggest danger we face with this approach is the
+possibility of an event handler existing in the thread pool's message
+queue <i>after</i> it has been deleted. When the thread's svc()
+method attempts to invoke <i>handle_input()</i> you will get a nasty
+core dump.
+<p>
+The safest way to handle the situation is to use reference-counted
+pointers everywhere a Client_Handler pointer would be used. That's
+beyond the scope of the tutorial but I encourage you to give it a
+try. If you want to contribute that back as an enhanced Tutorial,
+I'll be glad to include it.
+<p>
+Another approach that should work quite well is to use the
+ACE_TP_Reactor instead of just ACE_Reactor. This takes a little more
+setup but results in a cleaner implementation. Again, I've not had
+time to develop a Tutorial on the TP_Reactor but would welcome any
+contributions.
<P>
<HR WIDTH="100%">
<CENTER>[<A HREF="..">Tutorial