[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] ASTRewrite

By nature, asynchronous blocking threads are not easily detectable. May be a racing condition.

It may help to do some printouts who else is accessing the document.

HTH anyway,

Walter

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
> Behalf Of Joseph Paul Cohen
> Sent: Dienstag, 10. Juli 2012 20:22
> To: CDT General developers list.
> Subject: Re: [cdt-dev] ASTRewrite
> 
> I tried it in the UI thread and by scheduling a Job. Is that what you mean by
> synchronized access? I added a read lock to the index and that didn't do
> anything.
> 
> I'm grabbing the editors selected IAST node. Then passing an ASTVisitor to
> each Translations Unit's indexed AST while populating an ASTRewrite object for
> each ast.. This all happens in one thread because I'm calling visit on the
> AST.
> 
> After all the AST's have been walked I call rewriteAST on each AST's
> ASTRewrite object.
> 
> How can I get synchronized access?
> 
> -J
> 
> On Tue, Jul 10, 2012 at 1:03 PM, Brunauer, Walter
> <Walter.Brunauer@xxxxxxxxxxxxx> wrote:
> > Looks more like a persistency issue to me (probably updating the AST
> > file is blocked by some asynchronous access to the document).
> >
> >
> >
> > Have you synchronized access? Are you using multiple asynchronous
> > threads/jobs heavily?
> >
> >
> >
> > Walter
> >
> >
> >
> > From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> > On Behalf Of Sergey Prigogin
> > Sent: Dienstag, 10. Juli 2012 18:59
> > To: CDT General developers list.
> > Subject: Re: [cdt-dev] ASTRewrite
> >
> >
> >
> >
> >
> > On Tue, Jul 10, 2012 at 8:09 AM, Joseph Paul Cohen <jcccnet@xxxxxxxxx>
> > wrote:
> >
> > Hello,
> >
> > I have been using the CDT ASTRewrite object to create changes. For
> > some refactorings (not all) with multiple IAST nodes removed it hangs
> > at this line:
> >
> > final Change c = rw.rewriteAST();
> >
> > The thread says "waiting for: DirtyRegionQueue" (Image Attached)
> >
> > Can anyone tell me what this means? Or some hints at what to look at?
> >
> >
> >
> > Looks like a JVM problem. Have you tried to run it with JDK 1.6?
> >
> >
> > -J
> >
> >
> >
> > -sergey
> >
> >
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> >
> >
> >
> >
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> >
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev