summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/AsynchronousLock.py
Commit message (Collapse)AuthorAgeFilesLines
* Enable FD_CLOEXEC for non-blocking pipes.Zac Medico2013-01-031-2/+11
|
* Revert "AsynchronousLock: override _async_wait_cb"Zac Medico2013-01-011-3/+3
| | | | | | This reverts commit 83cfc04df383b56592b89f1dc58428c0e8d09925. This override could be bad if the base class needs to call _async_wait for some reason.
* AsynchronousLock: override _async_wait_cbZac Medico2013-01-011-3/+3
|
* _LockThread: use thread-safe EventLoop.idle_add()Zac Medico2012-12-311-35/+8
|
* AsynchronousTask: add _async_wait methodZac Medico2012-12-301-1/+1
| | | | | | | | For cases where _start returns synchronously, this method is a convenient way to trigger an asynchronous call to self.wait() (in order to notify exit listeners), avoiding excessive event loop recursion (or stack overflow) that synchronous calling of exit listeners can cause.
* _LockThread: daemon = TrueZac Medico2012-11-291-0/+1
|
* PollScheduler: remove register/unregister methodsZac Medico2012-10-051-4/+4
| | | | | | | These methods were aliases for the EventLoop io_add_watch and source_remove methods. Migrating to the EventLoop method names allows an EventLoop instance to substitute for a PollScheduler inside subclasses of AbstractPollTask.
* AbstractPollTask: merge _wait from subclassZac Medico2012-02-111-12/+0
|
* Use IO_* constants where appropriate.Zac Medico2012-02-091-5/+4
|
* Use AbstractPollTask._wait_loop() more.Zac Medico2012-02-081-4/+2
|
* Use PollScheduler iteration method.Zac Medico2012-02-071-5/+5
|
* PollScheduler: glib.io_add_watch() compatibilityZac Medico2012-02-071-0/+4
|
* AsynchronousTask: merge _waiting from subclassZac Medico2012-02-071-5/+2
|
* Fix some warnings found by pylint.Arfrever Frehtes Taifersar Arahesis2011-12-181-2/+2
|
* Handle OSError from os.read and loop if needed.Zac Medico2011-12-011-2/+2
| | | | | | Looping fixes EbuildMetadataPhase failures for ebuilds that produce more than 4096 bytes of metadata, broken since commit b432a1b3051d91546649e8f3190675767461d8e8.
* AsynchronousLock: use os.read/writeZac Medico2011-12-011-15/+28
| | | | | | Similar to commit b432a1b3051d91546649e8f3190675767461d8e8, don't use unecessary file objects. It also happens that these changes fix compatibility issues with PyPy.
* python3.2 fixes: ResourceWarning: unclosed fileZac Medico2011-08-251-0/+13
|
* _LockProcess: fix _poll returncodev2.2.0_alpha37Zac Medico2011-05-261-1/+1
| | | | | We don't want to return the returncode directly from the subprocess. Return self.returncode instead.
* _LockProcess: remove redundant scheduler attribZac Medico2011-05-261-1/+1
|
* AsynchronousLock: check type in _poll and _cancelZac Medico2011-05-261-3/+3
|
* _LockProcess.unlock: assert successful returncodeZac Medico2011-05-171-0/+3
|
* test_asynchronous_lock: simulate SIGINT from ttyZac Medico2011-05-171-2/+2
|
* AsynchronousLock: implement _poll() and testZac Medico2011-05-171-0/+10
|
* _LockProcess: handle process failure moreZac Medico2011-05-151-11/+28
|
* _LockProcess: handle process failure if cancelledZac Medico2011-05-151-3/+10
|
* AsynchronousLock: implement _cancelZac Medico2011-03-171-0/+8
|
* AsynchronousTask: add _cancel template methodZac Medico2011-03-161-0/+4
|
* Update copyright headers for touched files.Zac Medico2011-01-161-1/+1
|
* AsynchronousLock: use process by defaultZac Medico2011-01-131-1/+9
| | | | | | | The default behavior is to use a process instead of a thread, since there is currently no way to interrupt a thread that is waiting for a lock (notably, SIGINT doesn't work because python delivers all signals to the main thread).
* AsynchronousLock: protect _wait() from recursionZac Medico2010-10-221-3/+6
|
* Make _LockThread.lock_obj private.Zac Medico2010-10-221-6/+6
|
* AsynchronousLock: assert state in unlock()Zac Medico2010-10-221-0/+4
|
* lock-helper.py: use PORTAGE_PYM_PATH for safetyZac Medico2010-10-211-1/+1
|
* AsynchronousLock: use subprocess if no threadsZac Medico2010-10-211-17/+138
|
* Add a new AsynchronousLock class that uses the portage.locks module toZac Medico2010-09-131-0/+103
acquire a lock asynchronously, using a background thread.