Artifact 115d733df87f4188d0babb81837df91b6f9b4aa1b2fa16436c6364f1bf1bece5:
- File
src/OFKernelEventObserver+Private.h
— part of check-in
[45518ae7b7]
at
2016-03-20 14:07:47
on branch trunk
— Use the locked queue for kqueue and epoll as well
_readObjects must only be changed from the thread running the observer
and not from a thread adding or removing objects to observe. This is
already handled by the locked queue used by poll and select, so the best
way to solve this is to use the locked queue for kqueue and epoll as
well. (user: js, size: 1053) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 * Jonathan Schleifer <js@heap.zone> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFKernelEventObserver.h" OF_ASSUME_NONNULL_BEGIN @interface OFKernelEventObserver () - (void)OF_addObjectForReading: (id <OFReadyForReadingObserving>)object; - (void)OF_addObjectForWriting: (id <OFReadyForWritingObserving>)object; - (void)OF_removeObjectForReading: (id <OFReadyForReadingObserving>)object; - (void)OF_removeObjectForWriting: (id <OFReadyForWritingObserving>)object; - (void)OF_processQueue; - (bool)OF_processReadBuffers; @end OF_ASSUME_NONNULL_END