ObjFW  History of src/OFKernelEventObserver+Private.h of 3eab6316746cf288

History of file src/OFKernelEventObserver+Private.h at check-in 3eab6316746cf288

2020-01-08
02:29
Deleted: Merge branch 'master' into 1.0 check-in: [e7e1e1c6c5] user: js, branch: 1.0, size: 0
2020-01-07
20:28
Deleted: OFKernelEventObserver: Remove queueing of actions

This removes the ability to let a thread add or remove objects for
another thread. This features wasn't used at all, but caused significant
problems with kqueue and epoll, as this often resulted in removing a
file descriptor after it had already been closed. check-in: [24eff635db] user: js, branch: trunk, size: 0

2020-01-02
01:51
Update copyright file: [55f1e4e05d] check-in: [c7f0229795] user: js, branch: trunk, size: 1091 [annotate] [blame] [check-ins using] [diff]
2019-01-03
19:13
Update copyright file: [6d5cc1589d] check-in: [0509d7a844] user: js, branch: trunk, size: 1088 [annotate] [blame] [check-ins using] [diff]
2018-01-03
19:49
Update copyright notice file: [1dccb56dcb] check-in: [7e5c81e186] user: js, branch: trunk, size: 1082 [annotate] [blame] [check-ins using] [diff]
2017-05-21
21:28
Prefix private methods with of_ instead of OF_

This matches Apple's style. file: [2e13c9e416] check-in: [6b77a5dd8b] user: js, branch: trunk, size: 1059 [annotate] [blame] [check-ins using] [diff]

2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [63b9067ddf] check-in: [44f45c2e35] user: js, branch: trunk, size: 1059 [annotate] [blame] [check-ins using] [diff]

2016-03-20
14:19
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. file: [38a2edcf5b] check-in: [85917ea0dd] user: js, branch: 0.8, size: 1072 [annotate] [blame] [check-ins using] [diff]

14:07
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. file: [115d733df8] check-in: [45518ae7b7] user: js, branch: trunk, size: 1053 [annotate] [blame] [check-ins using] [diff]

12:05
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. file: [32cc2734b2] check-in: [b84490ab4f] user: js, branch: 0.8, size: 749 [annotate] [blame] [check-ins using] [diff]

11:57
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. file: [eb360b3361] check-in: [7ae17af9f0] user: js, branch: trunk, size: 730 [annotate] [blame] [check-ins using] [diff]

2016-01-03
00:43
Update copyright

While at it, also update the mail address. file: [1372173ce7] check-in: [cec0f072f8] user: js, branch: 0.8, size: 749 [annotate] [blame] [check-ins using] [diff]

00:41
Update copyright

While at it, also update the mail address. file: [b8cff57a1b] check-in: [2a27cf3000] user: js, branch: trunk, size: 730 [annotate] [blame] [check-ins using] [diff]

2015-12-29
21:42
Refactor OFKernelEventObserver

This moves the locked queue for actions to
OFKernelEventObserver_LockedQueue, which is now used for select and
poll, but skipped for kqueue and epoll, as they natively support changes
from another thread.

This fixes the problem that removing an object is delayed until the next
observe call - at which point it might have already been closed, meaning
the fd is no longer available. This was mainly a problem with kqueue, as
closing the fd already removed it from the kqueue, which then resulted
in an error being returned when trying to manually remove the fd from
the kqueue. file: [0581f9845e] check-in: [c5f0c5f9ba] user: js, branch: 0.8, size: 745 [annotate] [blame] [check-ins using] [diff]

21:33
Refactor OFKernelEventObserver

This moves the locked queue for actions to
OFKernelEventObserver_LockedQueue, which is now used for select and
poll, but skipped for kqueue and epoll, as they natively support changes
from another thread.

This fixes the problem that removing an object is delayed until the next
observe call - at which point it might have already been closed, meaning
the fd is no longer available. This was mainly a problem with kqueue, as
closing the fd already removed it from the kqueue, which then resulted
in an error being returned when trying to manually remove the fd from
the kqueue. file: [ef9792ab10] check-in: [e9b4700cb6] user: js, branch: trunk, size: 726 [annotate] [blame] [check-ins using] [diff]

2015-11-29
14:23
Clean up class extensions

Now that we can require GCC >= 4.6, we no longer need to fall back to
using a category on old compilers. file: [2c8d4ea4a1] check-in: [2aca549d60] user: js, branch: trunk, size: 985 [annotate] [blame] [check-ins using] [diff]

2015-06-13
22:26
Add support for and use the new nullability file: [e624333841] check-in: [9e76144ef8] user: js, branch: trunk, size: 1004 [annotate] [blame] [check-ins using] [diff]
2015-05-09
18:13
More OFKernelEventObserver refactoring

This was necessary because select(), poll() and kevent() on FreeBSD and
OS X would sometimes return 0 events, even if there are some, and
sometimes return the correct number of events that were pending, meaning
the number of events returned is unreliable. To make things worse,
whether it returns 0 or the number of events that were pending is
completely non-deterministic on both FreeBSD and OS X (running the same
tests multiple times in a row would make it sometimes work and sometimes
fail).

In order to prevent code from depending on the return value of
-[observeForTimeInterval:] (which would depend on select(), poll() and
kevent() returning the correct number), OFKernelObserver no longer
returns whether there were pending events. It is expected that
-[observe] or -[observeForTimeInterval:] is just called in a loop as
long as events should be handled.

The tests have been changed as well to reflect this. What they do now is
set a deadline and call -[observeForTimeInterval:] with a small timeout
in a loop until the deadline is reached or all events have been handled.

Note: DragonFlyBSD has not been tested, but will most likely behave like
FreeBSD and OS X. file: [dfd89ec8e7] check-in: [220513a3f5] user: js, branch: trunk, size: 947 [annotate] [blame] [check-ins using] [diff]

2015-05-04
20:34
Refactor OFKernelEventObserver file: [0257c37a21] check-in: [bbe4040126] user: js, branch: trunk, size: 947 [annotate] [blame] [check-ins using] [diff]
2015-04-26
10:40
OFKernelEventObserver: Rename a private method file: [eac8ac6f06] check-in: [bd05eb8de3] user: js, branch: trunk, size: 967 [annotate] [blame] [check-ins using] [diff]
2015-01-03
20:57
Update copyright file: [40cec7a9e7] check-in: [cfd374b906] user: js, branch: trunk, size: 961 [annotate] [blame] [check-ins using] [diff]
2014-08-22
19:09
Retain sockets until after removal from observer

Not retaining them caused kevent() to be called on an invalid fd. file: [c004806a34] check-in: [1dbe9a4e4e] user: js, branch: trunk, size: 955 [annotate] [blame] [check-ins using] [diff]

2014-06-21
21:43
Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. file: [9baa15c51b] check-in: [13ee56edf3] user: js, branch: trunk, size: 912 [annotate] [blame] [check-ins using] [diff]

2014-01-28
22:50
Added: Rename OFStreamObserver -> OFKernelEventObserver file: [4c35b436cf] check-in: [96e20b8093] user: js, branch: trunk, size: 932 [annotate] [blame] [check-ins using]