| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
| |
Run timeouts last, in order to minimize latency in termination of
iteration loops that they may control.
|
| |
|
| |
|
|
|
|
|
| |
The effect is be mostly the same, but it's more conistent to use
_do_poll for all blocking, plus it has EINTR handling.
|
|
|
|
|
|
|
|
|
| |
The IO watch is dynamically registered and unregistered as needed,
since we don't want to consider it as a valid source of events when
there are no child listeners. It's important to distinguish when there
are no valid sources of IO events, in order to avoid an endless poll
call if there's no timeout. This fixes possbible endless poll calls
since commit 1979a6cdfcd8c6bae4565982d82d862be07ba5be.
|
|
|
|
|
|
| |
TODO: Find out why SIGCHLD signals aren't delivered during poll calls,
forcing us to wakeup in order to receive them. This fixes random hangs
in poll calls since commit 1979a6cdfcd8c6bae4565982d82d862be07ba5be.
|
| |
|
|
|
|
|
| |
This fixes an infinite loop since commit
1979a6cdfcd8c6bae4565982d82d862be07ba5be.
|
|
|
|
|
| |
This fixes performance issues introduced by commit
9c664779a16f6cbca8a5ffe7f6b0c68572819723.
|
| |
|
| |
|
|
|
|
|
| |
This ensures that the EventLoop will not stop due to a waitpid call
blocking forever.
|
|
|
|
|
|
|
| |
Sleep so that we don't waste cpu time by looping too quickly. This
makes EventLoop useful for code that needs to wait for timeout
callbacks regardless of whether or not any IO handlers are currently
registered.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
KeyError observed from WeakValueDictionary.pop() with PyPy 1.8,
despite None given as default. Note that PyPy 1.8 has the same
WeakValueDictionary code as CPython 2.7, so it may be possible for
CPython to raise KeyError here as well.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These cases should have been included with commit
6a94a074aa0475173a51f3f726377d4c407e986b.
|
|
|
|
|
| |
These checks should be irrelevant, since the cancel() method is never
called on anything that hasn't been started already.
|
|
|
|
|
|
| |
IO event handlers may be re-entrant, in case something like
AbstractPollTask._wait_loop(), needs to be called inside a handler for
some reason.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we close all open file descriptors after a fork, with PyPy 1.8 it
triggers "[Errno 9] Bad file descriptor" later in the subprocess.
Apparently it is holding references to file descriptors and closing
them after they've already been closed and re-opened for other
purposes. As a workaround, we don't close the file descriptors, so
that they won't be re-used and therefore we won't be vulnerable to this
kind of interference.
The obvious caveat of not closing the fds is that the subprocess can
hold locks that belonged to the parent process, even after the parent
process has released the locks. Hopefully this won't be a major problem
though, since the subprocess has to exit at release the lock
eventually, when the EbuildFetcher or _MergeProcess task is complete.
|
|
|
|
|
|
|
| |
Silently handle EINTR, which is normal when we have received a signal
such as SIGINT. Also, raise StopIteration in order to break out of our
current iteration and respond appropriately to the signal as soon as
possible.
|
|
|
|
|
|
| |
Synchronous waiting for status is not supported, since it would be
vulnerable to hitting the recursion limit when a large number of tasks
need to be terminated simultaneously, like in bug #402335.
|
|
|
|
|
|
|
| |
This fixes infinite loops triggered by Ctrl-C, where timeout calls
would exhaust the poll event queue because _poll was not re-entrant.
Now, re-entrance is only prohibited for individual callback functions,
in order to protect against infinite recursion.
|
| |
|
|
|
|
| |
See https://bugs.pypy.org/issue833 for details.
|
|
|
|
|
|
| |
The corresponding hashlib issues are fixed in PyPy 1.8:
https://bugs.pypy.org/issue957
|
|
|
|
|
|
|
|
|
| |
This fixes a regression in termination signal handling since commit
8c1fcf5a9ba9fa4d406a4d0cc284fe73a84f5a63, which cause termination
signals to be ignored until a running job had exited. This regression
is not really noticeable for Ctrl-C handling, since in that case the
SIGINT propagets to subprocesses, causing them to exit and trigger a
_schedule() call whichtriggers a termination check.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Regenerate metadata for given cpv in each repository.
|
| |
|
| |
|
|
|
|
| |
The _keep_scheduling() template method is used instead.
|
|
|
|
|
|
|
|
| |
Raising StopIteration doesn't work with GlibEventLoop, since it catches
all exceptions and logs them. So, just use a boolean expression to
terminate the while loop. This depends on commit
dcb9fab8463996542d06d29bc383f5933bf0d677 so that IpcDaemonTestCase
timeouts work correctly with both EventLoop and GlibEventLoop.
|
|
|
|
|
|
|
|
|
| |
This fixes EventLoop.iteration() so that it doesn't poll too long when
there are timeouts registered, since it's not nice to spend a long time
polling for an IO event that might never arrive even though a timeout
may have changed some state that would terminate a timeout loop like
in QueueScheduler.run() or AbstractPollTask._wait_loop(). This makes
EventLoop.iteration() behave more like GlibEventLoop.iteration().
|
|
|
|
|
| |
This has been broken since commit
93b654199a32fc3df1299b030317720b9294b0c3.
|