Differences From Artifact [06cbc8baae]:
- File src/OFKernelEventObserver_LockedQueue.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 4783) [annotate] [blame] [check-ins using]
To Artifact [1dd69e1924]:
- File
src/OFKernelEventObserver_LockedQueue.m
— part of check-in
[7ae17af9f0]
at
2016-03-20 11:57:06
on branch trunk
— Never block when the read buffer is non-empty
This was broken by 88f2f03. The problem only existed when something was
in the read buffer, but not processed completely, as after processing
the read buffer, it would go on to wait for data - but since not the
entire read buffer had been processed, it meant there was still data
left there that needed to be handled first. (user: js, size: 4859) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
166 167 168 169 170 171 172 173 174 175 176 177 178 179 | fileDescriptor: (int)fd { OF_UNRECOGNIZED_SELECTOR } - (void)OF_processQueue { #ifdef OF_HAVE_THREADS [_mutex lock]; @try { #endif int *queueActions = [_queueActions items]; int *queueFDs = [_queueFDs items]; id const *queueObjects = [_queueObjects objects]; | > > | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | fileDescriptor: (int)fd { OF_UNRECOGNIZED_SELECTOR } - (void)OF_processQueue { void *pool = objc_autoreleasePoolPush(); #ifdef OF_HAVE_THREADS [_mutex lock]; @try { #endif int *queueActions = [_queueActions items]; int *queueFDs = [_queueFDs items]; id const *queueObjects = [_queueObjects objects]; |
︙ | ︙ | |||
225 226 227 228 229 230 231 | [_queueFDs removeAllItems]; [_queueObjects removeAllObjects]; #ifdef OF_HAVE_THREADS } @finally { [_mutex unlock]; } #endif | | > > | 227 228 229 230 231 232 233 234 235 236 237 | [_queueFDs removeAllItems]; [_queueObjects removeAllObjects]; #ifdef OF_HAVE_THREADS } @finally { [_mutex unlock]; } #endif objc_autoreleasePoolPop(pool); } @end |