summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/PollScheduler.py
Commit message (Collapse)AuthorAgeFilesLines
* Move _emerge.SlotObject to portage.util.Zac Medico2012-02-171-1/+1
|
* EventLoop: implement child_watch_addZac Medico2012-02-161-1/+3
|
* AsynchronousTask: don't wait for exit statusZac Medico2012-02-131-0/+3
| | | | | | 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.
* PollScheduler: use idle_add to check terminationZac Medico2012-02-121-22/+39
| | | | | | | | | 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.
* PollScheduler: return None from _schedule_tasksZac Medico2012-02-111-5/+10
| | | | The _keep_scheduling() template method is used instead.
* PollScheduler: add generic _main_loop()Zac Medico2012-02-101-0/+22
|
* Use IO_* constants where appropriate.Zac Medico2012-02-091-1/+8
|
* Add global_event_loop() and GlibEventLoop.Zac Medico2012-02-091-2/+2
| | | | | | This causes all PollScheduler instances within a given process to share a singleton EventLoop instance, and also makes it possible to swap in glib's main loop for all portage event loops in the main process.
* Move EventLoop to a separate file.Zac Medico2012-02-081-366/+1
|
* PollScheduler: remove _poll_loopZac Medico2012-02-081-22/+2
| | | | | We can use iteration() instead, and _poll_loop's exit behavior doesn't seem practical to emulate with glib.MainLoop.
* PollScheduler: remove EventLoop._schedule hookZac Medico2012-02-081-12/+5
| | | | | PollScheduler and subclasses be should already be calling self._schedule() when necessary.
* EventLoop: use same method names as glibZac Medico2012-02-081-16/+16
|
* PollScheduler: don't inherit EventLoopZac Medico2012-02-081-10/+12
|
* PollScheduler: split out EventLoop base classZac Medico2012-02-081-106/+116
|
* PollScheduler: remove _schedule_waitZac Medico2012-02-071-47/+1
|
* PollScheduler: add iteration methodZac Medico2012-02-071-9/+24
|
* PollScheduler: implement idle_addZac Medico2012-02-071-1/+45
|
* PollScheduler: glib.io_add_watch() compatibilityZac Medico2012-02-071-16/+34
|
* PollScheduler: timeouts regardless of IO eventsZac Medico2012-02-071-9/+50
| | | | | | Now PollScheduler will execute timeouts predictably, even when there no IO events being generated. This allows the Scheduler's display updates to be handled via timeout_add.
* PollScheduler: add timeout_add like glib'sZac Medico2012-02-071-4/+85
| | | | | This will be useful as a substitute for recursion, in order to avoid hitting the recursion limit for bug #402335.
* python3.2 fixes: ResourceWarning: unclosed fileZac Medico2011-08-251-0/+3
|
* PollScheduler: tweak _unregister event cleanupZac Medico2011-03-251-5/+9
|
* PollScheduler: handle missing log directoryZac Medico2011-03-251-12/+23
| | | | | This can be triggered by AbstractPollTask._log_poll_exception(), as reported by Michael Haubenwallner <haubi@gentoo.org> for AIX.
* PollScheduler: tweek termination logicZac Medico2011-03-101-0/+21
| | | | | | | | | * PollScheduler and all subclasses now use the _terminated_tasks variable to check whether or not _terminate_tasks() has been called, and behave appropriately in that case. * The _schedule_tasks() method now has documentation about the relationship with _terminate_tasks() and _terminated_tasks.
* PollScheduler: call _terminate_tasks in _scheduleZac Medico2011-03-101-7/+11
| | | | | This prevents it from being called while the _schedule_tasks() implementation is running, in order to avoid potential interference.
* Add PollScheduler.terminate() for interruption.Zac Medico2011-01-151-1/+30
| | | | | This allows PollScheduler instances to do basic cleanup and terminate gracefully when SIGINT or SIGTERM signals are received.
* Add sanity checks for system clock changes.Zac Medico2010-10-231-1/+7
|
* Fix parallel-fetch output by BinpkgVerifier.Zac Medico2010-10-141-2/+8
| | | | | BinpkgVerifier was erroneusly sending parallel-fetch output to stdout. Thanks to Jeremy Olexa <darkside@g.o> for reporting.
* Add a 'condition' keyword argument to PollScheduler._schedule_wait()Zac Medico2010-09-131-1/+3
| | | | | which is a callable that should return True when it is desirable for the _schedule_wait() method to return.
* Add support for a timeout argument to QueueScheduler.run() andZac Medico2010-09-031-5/+11
| | | | | use it in IpcDaemonTestCase to implement a 40 second timeout in test cases.
* Remove unused imports found by pylint.Arfrever Frehtes Taifersar Arahesis2010-08-291-1/+0
|
* Bug #324191 - Add support for FEATURES=compress-build-logs. The causesZac Medico2010-08-211-2/+36
| | | | | | | all build logs to be compressed while they are being written. Log file names have an extension that is appropriate for the compression type. Currently, only gzip(1) compression is supported, so build logs will have a '.gz' extension when this feature is enabled.
* Remove PollScheduler._schedule_waitpid() since this case isn't triggeredZac Medico2010-08-151-28/+1
| | | | | | anymore, now that PollScheduler._unregister() has be fixed to discard unhandled events (so that reallocation of file descriptors no longer triggers erroneous delivery of stale events).
* Don't handle KeyError when looking up event handlers, sinceZac Medico2010-08-151-31/+12
| | | | _unregister() automatically discards stale events now.
* Fix PollScheduler._unregister() to discard any unhandled eventsZac Medico2010-08-151-0/+13
| | | | | | | | | that belong to the unregistered file, in order to prevent these events from being erroneously delivered to a future handler that is using a reallocated file descriptor of the same numeric value (causing extremely confusing bugs). Note that this is was the cause of the intermittent bug that forced me to disable EbuildIpcDaemon by default.
* Fix _schedule spelling in _schedule_waitpid().Zac Medico2010-08-141-1/+1
|
* Add a PollScheduler._schedule_waitpid() method for SubProcess._wait()Zac Medico2010-08-141-1/+32
| | | | | to use as an alternative to hanging up the scheduler in a blocking waitpid call.
* Handle KeyError due to stale events.Zac Medico2010-08-131-6/+14
|
* * Fix IndexError in PollScheduler._next_poll_event() by raisingZac Medico2010-08-131-2/+11
| | | | | | StopIteration instead. * Add an optional timeout parameter to PollScheduler._schedule_wait() (this will be used in a later commit).
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* Update syntax of 'except' statements for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-1/+1
| | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289
* Bug #282808 - Handle a potential KeyError inside PollScheduler._poll_loop()Zac Medico2009-09-051-1/+8
| | | | | | | when _poll_event_queue contains an event for a file descriptor that has already been unregistered. svn path=/main/trunk/; revision=14185
* Add/update copyright headers.Zac Medico2009-06-251-0/+4
| | | | svn path=/main/trunk/; revision=13690
* Bug #275047 - Split _emerge/__init__.py into smaller pieces (part 3).Zac Medico2009-06-221-0/+251
Thanks to Sebastian Mingramm (few) <s.mingramm@gmx.de> for this patch. svn path=/main/trunk/; revision=13668