Author Topic: Patch to Add the ability to Disable Call Tips  (Read 13728 times)

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Patch to Add the ability to Disable Call Tips
« on: January 24, 2006, 05:27:01 am »
This patch, posted here on sourceforge.  Here is the description:

Call tips activate whenever you press the '(' key in
front of a function. This patch add another option to
the CodeCompletion menu just like "Disable
CodeCompletion" but for calltips. Current instabilities
in the codecompletetion program can cause it the
threads to dead lock when it tries to generate the call
tips. This also add the config file property
"use_call_tips".

This currently patches the:
settings.xrc - Adds "Disable Call Tips" check box
ccoptionsdlg.cpp - Checks Config and sets the check
box properly and config file properly.
codecompletion.cpp - Checks the value of
"use_call_tips" in the config file before making call tip.
makefile.am - updated to include the proper files.

I would also like to say I get number thread dead locks during codecomplete.  The current one happens during a namespace alias codecompleletion attempt.

EDIT- After some digging it appears the CC code doesn't ignores the max threads options and seems to fire off a thread every time it is asked to parse a file.  There is also a suspicous looking timer in there.  I haven't really done threading much, but I know you should never, ever, ever, count on some kind of timing interval to protect you in a threaded environment.
« Last Edit: January 24, 2006, 06:11:22 am by Game_Ender »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Patch to Add the ability to Disable Call Tips
« Reply #1 on: January 24, 2006, 08:35:41 am »
Thanks for the patch. I hope you submitted it at the patch tracker...

Quote
EDIT- After some digging it appears the CC code doesn't ignores the max threads options and seems to fire off a thread every time it is asked to parse a file.  There is also a suspicous looking timer in there.  I haven't really done threading much, but I know you should never, ever, ever, count on some kind of timing interval to protect you in a threaded environment.

I don't have the code in front of me, but the timer is #ifdef'd and used while Rick was profiling his changes in CC.
The reason threads are not counted is because they 're added in a thread pool. This pool only runs X threads concurrently (X == number of CPUs (hyperthreading counts for two ;)))
Be patient!
This bug will be fixed soon...