Re: Serial IO seems to be starving UI
Re: Serial IO seems to be starving UI
- Subject: Re: Serial IO seems to be starving UI
- From: Rick Mann <email@hidden>
- Date: Fri, 30 Jan 2009 14:02:26 -0800
On Jan 30, 2009, at 10:21:35, A.M. wrote:
What is likely happening is that the NSFileHandle processing is
starving the main NSRunLoop. This happens because NSRunLoop
processes non-user input before it processes user events (which
seems backwards for the main run loop but is nevertheless the case).
The only solution is to use a secondary runloop on a second thread
to process the data, then safely get that info back to the main
thread and trigger redrawing. You should likely process the data on
the second thread as well so that the main thread is completely free
for user events.
I have no explanation of why it should suddenly "not work" other
than that data is probably flowing in faster or requires more
processing.
If anything, data is coming in more slowly. I used to run it at
115200, now it's at 9600. I may be able to get one of my other MBPs to
run 10.5.5, and try it there.
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden