vortex.ChannelPool — PyVortexChannelPool class: channel pools

API documentation for vortex.ChannelPool object representing a set of channels that are reused across the session.

Module API

class vortex.ChannelPool
next_ready([auto_inc][, user_data])

Allows to get a ready channel from the pool. If auto_inc is set to True, the pool creates a new channel in case there is no ready channel at this time.

  • auto_inc (Boolean (default False if not defined)) – Instruct the channel pool to create a new channel in the case no channel is available.
  • user_data (Object) – Optional reference to a object that is passed to the create channel handler defined at vortex.Connection.channel_pool_new.
Return type:

a reference to vortex.Channel or None if it fails. None can be returned if auto_inc is not defined or set to False and no ready channel is available.


Allows to release the give channel into the pool, making it available for future next_ready calls.

Parameters:channel (vortex.Channel reference acquired via next_ready() call.) – Channel reference to be released.

(Read only attribute) (Integer) returns the channel pool unique identifier. This identifier is unique in context of the connection.


(Read only attribute) (vortex.Ctx) returns the context where the vortex.ChannelPool was created.


(Read only attribute) (vortex.Connection) returns the connection where this channel pool is running.


(Read only attribute) (Integer) returns the number of channels that are handled by the channel pool.


(Read only attribute) (Integer) returns the number of channels available (that are ready to be returned by calling to next_ready ())