You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2005/12/24 02:24:22 UTC
svn commit: r358892 - /directory/network/trunk/xdocs/faq.fml
Author: ersiner
Date: Fri Dec 23 17:24:19 2005
New Revision: 358892
URL: http://svn.apache.org/viewcvs?rev=358892&view=rev
Log:
Updated thread safity part of the faq.
Modified:
directory/network/trunk/xdocs/faq.fml
Modified: directory/network/trunk/xdocs/faq.fml
URL: http://svn.apache.org/viewcvs/directory/network/trunk/xdocs/faq.fml?rev=358892&r1=358891&r2=358892&view=diff
==============================================================================
--- directory/network/trunk/xdocs/faq.fml (original)
+++ directory/network/trunk/xdocs/faq.fml Fri Dec 23 17:24:19 2005
@@ -189,15 +189,19 @@
<faq id="handler-synchronization">
<question>
- Do I need to make IoHandler and ProtocolHandler thread-safe?
+ Do I need to make my IoHandler thread-safe?
</question>
<answer>
<p>
- You don't need to do because all events generated by MINA are
- transmitted to your handlers in order, and the newer event is not
- processed if the event handler method for the older event for
- the same session didn't return yet because MINA uses leader-followers
- thread pool by default.
+ It depends on your implementation. If you access the resource
+ which is shared across multiple sessions, you have to make it
+ thread-safe. If the resource is not shared at all and accessed
+ by only one session (e.g. storing context information as a session
+ attribute), then you don't need to make it thread-safe. It is
+ because all events generated by MINA are transmitted to your
+ handler in order, and the newer event is not processed if the
+ event handler method for the older event for the same session didn't
+ return yet because MINA uses leader-followers thread pool by default.
</p>
</answer>
</faq>