Package zeroinstall :: Package support :: Module tasks :: Class InputBlocker
[frames] | no frames]

Class InputBlocker

source code

object --+    
         |    
   Blocker --+
             |
            InputBlocker

Triggers when os.read(stream) would not block.

Instance Methods
 
__init__(self, stream, name)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add_task(self, task)
Called by the schedular when a Task yields this Blocker.
source code
 
remove_task(self, task)
Called by the schedular when a Task that was waiting for this blocker is resumed.
source code

Inherited from Blocker: __repr__, __str__, trigger

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables

Inherited from Blocker: exception

Properties

Inherited from object: __class__

Method Details

__init__(self, stream, name)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • name (str)
  • stream (int)
Overrides: object.__init__

add_task(self, task)

source code 

Called by the schedular when a Task yields this Blocker. If you override this method, be sure to still call this method with Blocker.add_task(self)!

Parameters:
Overrides: Blocker.add_task

remove_task(self, task)

source code 

Called by the schedular when a Task that was waiting for this blocker is resumed.

Parameters:
Overrides: Blocker.remove_task