Bugzilla – Bug 124363
Events: The LDAP monitorEvents.c sample pegs the CPU at 100% usage.
Last modified: 2007-05-14 17:49:04 UTC
------- Bug moved to this database by vrajkumar@novell.com 2005-10-10 16:54 ------- This bug previously known as bug DEFECT000302240 at remedy/ remedy/show_bug.cgi?id=DEFECT000302240 Originally filed under the NDS SDK product and LDAP C SDK component. --------- <remedy_version_found_in> BLANK </remedy_version_found_in> --------- <remedy_milestone> BLANK </remedy_milestone> --------- <remedy_details> Because it calls ldap_result with a timeout of {0.0}, it's in a tight polling loop. If we call it with a timeout of 5 or 10 seconds, we still get events back as soon as they happen, but the CPU is freed. This lets the app wake up often enough to check for an exit condition. Since people will copy the example, we should show the better way. </remedy_details>