<div dir="ltr"><div><div><div>Yes it already runs on a separate thread; however when its known
the result is no longer necessary (for example the user changed the
cursor location - negating the need for autocomplete at the previous
location) the separate thread still runs consuming resources. <br><br></div>On
slower devices like laptops these operations can take a long time.
Even if we are willing to accept the waste of cycles (and battery
life!), the processor has a limited number of cores and responsiveness
will be poor if too many "zombie" jobs are still running.<br><br></div>I'm willing to add this functionality and submit it upstream if necessary, but prior to doing so I wanted to reach out to current developers. It would be unfortunate to invest significant effort only to find my patch can't be accepted for an avoidable reason.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 12, 2015 at 4:09 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Have you tried running libclang on a separate thread?</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sun, Jan 11, 2015 at 7:59 PM, John Sully <span dir="ltr"><<a href="mailto:john@csquare.ca" target="_blank">john@csquare.ca</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>I'm in the process of writing an editor based upon libclang, and a major issue I'm hitting is the inability to cancel long running tasks. The primary tasks are parsing and creation of auto-complete results.<br><br>Is there already functionality to do this that I've missed?<br></div><br>If not, I would like to implement this as its a requirement to get good responsiveness out of my editor. Has there been any prior discussions on how this should be implemented?<br></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>