Package ecore :: Module c_ecore :: Class IdleEnterer
[hide private]
[frames] | no frames]

Class IdleEnterer

object --+
         |
        IdleEnterer

Add an idle enterer handler.

This class represents a function that will be called before systems enter idle. The function will be passed any extra parameters given to constructor.

When the idle enterer func is called, it must return a value of either True or False (remember that Python returns None if no value is explicitly returned and None evaluates to False). If it returns True, it will be called again when system become idle, or if it returns False it will be deleted automatically making any references/handles for it invalid.

Idle enterers should be stopped/deleted by means of delete() or returning False from func, otherwise they'll continue alive, even if the current python context delete it's reference to it.

Idle enterer are useful for post-work jobs, like garbage collection.

func signature: func(*args, **kargs): bool

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__repr__(...)
repr(x)
 
__str__(...)
str(x)
 
delete(...)
Stop callback emission and free internal resources.
 
stop(...)
Alias for delete().

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(...)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(...)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)