[Xapian-tickets] [Xapian] #769: Provide more options for lock retrying
Xapian
nobody at xapian.org
Thu Oct 4 23:29:07 BST 2018
#769: Provide more options for lock retrying
-------------------------+-------------------------
Reporter: bremner | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Other | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+-------------------------
Comment (by olly):
The other problem with `timer_create()` is that it seems to have somewhat
limited portability in practice - so far we've found that OpenBSD and GNU
Hurd just have dummy implementations which always fail with `ENOSYS`, on
AIX it always seems to fail with `EAGAIN`, and on NetBSD the calls appear
to work but the timer doesn't actually seem to trigger after the timeout
has passed.
If we're using threads, we could perhaps launch one to perform the
`fcntl()` call and a second which just does `sleep()` (or a finer
granularity variant where supported) and then kills the first thread.
A "sleeper thread" could probably also be used to implement the match
timeout on platforms where `timer_create()` isn't usable (or maybe
everywhere even).
--
Ticket URL: <https://trac.xapian.org/ticket/769#comment:2>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list