Lloyd Thomas wrote: > I don't understand where I am going wrong, but I have the following code in > a windows app and a service. When I run the app in idle it uses 0% cpu, but > if I run the service it uses 50% of the CPU. > If I change the var activeport := false, (as to not receive serial data) the > service falls back to using 0% cpu. > > Can someone advise what to do? > Why the difference between an app and a service?
You're not deferring to other threads in your main loop... inserting a "Sleep(1);" line just before "until false;" should do the trick. Regards, Ulrich ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public