[ 
https://issues.apache.org/jira/browse/XERCESJ-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051532#comment-13051532
 ] 

Michael Glavassevich commented on XERCESJ-1429:
-----------------------------------------------

Hi Thiwanka,

I know this is a work in progress and that you've probabaly added more and 
possibly changed it quite a bit since you posted this code. I do have some 
comments which I hope are of help to you.

I would suggest making the 'fBusy' field volatile to allow its value to be 
consistent across threads. Also, you can avoid storing the LSInput as a field 
if you make the Runnable an anonymous class within the parse() method. It looks 
like you may have already been thinking about doing that as I see this line 
"//final LSInput input = is;" commented out in the method. Your Runnable would 
also need to call super.parse() otherwise the call sequence will end up in an 
infinite recursion and very quickly a stack overflow.

Hope that helps.

Thanks.

> [GSoC]: Asynchronous LSParser and parseWithContext
> --------------------------------------------------
>
>                 Key: XERCESJ-1429
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1429
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: DOM (Level 3 Load & Save)
>    Affects Versions: 2.9.1
>            Reporter: Michael Glavassevich
>              Labels: gsoc2011
>
> The goal of this project is to complete the implementation of the DOM Level 3 
> LSParser. Though Xerces has a functional LSParser, there are a couple parts 
> of the spec which still need to be implemented. This includes an asynchronous 
> [1] version which returns from the parse method immediately and builds the 
> DOM tree on another thread as well as parseWithContext [2] which allows a 
> document fragment to be parsed and attached to an existing DOM.
> Possible Mentors: Michael Glavassevich
> [1] 
> http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS-LSParser
> [2] 
> http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS-LSParser-parseWithContext

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-dev-h...@xerces.apache.org

Reply via email to