tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36541] - session getAttribute/setAttribute and removeAttribute are NOT Thread safe.
Date Thu, 08 Sep 2005 13:20:40 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36541>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36541





------- Additional Comments From darryl@darrylmiles.org  2005-09-08 15:20 -------
(In reply to comment #36)
>  One for read and one for write, while
> the writer is modifying the map it corrupted the pointers the reader is using to
> traverse the data structures and thus enters an infinite loop

Sorry to reply to my own post, but my use of the word "corrupted" is a bad choice.


In the normal operation of a write modification to the map the internal data
structures are altered into a temporary inconsitant state.  This inconsitancy is
part of the normal working of the write operation.  When the write operation
returns to the application the map integrity is always consistant.

The basic contract is true of all object design, unless otherwise stated to be
thread safe.  Which we all agree HashMap is not.


If the read operations happens to bump into this moment of temporary
inconsistacy the infinite loop can occur.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message