# Path: hystrix/pool.py
# class Pool(six.with_metaclass(PoolMetaclass, ProcessPoolExecutor)):
# 
#     pool_key = None
# 
#     def __init__(self, pool_key=None, max_workers=5):
#         super(Pool, self).__init__(max_workers)


import logging
import six
from .pool import Pool
from __future__ import absolute_import



log = logging.getLogger(__name__)


class GroupMetaclass(type):

    __instances__ = dict()
    __blacklist__ = ('Group', 'GroupMetaclass')

    def __new__(cls, name, bases, attrs):

        if name in cls.__blacklist__:
            return super(GroupMetaclass, cls).__new__(cls, name, bases, attrs)

        group_key = attrs.get('group_key') or '{}Group'.format(name)
        new_class = super(GroupMetaclass, cls).__new__(cls, group_key,
                                                       bases, attrs)

        pool_key = attrs.get('poll_key') or '{}Pool'.format(group_key)

# Path: hystrix/pool.py
# class Pool(six.with_metaclass(PoolMetaclass, ProcessPoolExecutor)):
# 
#     pool_key = None
# 
#     def __init__(self, pool_key=None, max_workers=5):
#         super(Pool, self).__init__(max_workers)


# Path: hystrix/group.py
import logging
import six
from .pool import Pool

from __future__ import absolute_import



log = logging.getLogger(__name__)


class GroupMetaclass(type):

    __instances__ = dict()
    __blacklist__ = ('Group', 'GroupMetaclass')

    def __new__(cls, name, bases, attrs):

        if name in cls.__blacklist__:
            return super(GroupMetaclass, cls).__new__(cls, name, bases, attrs)

        group_key = attrs.get('group_key') or '{}Group'.format(name)
        new_class = super(GroupMetaclass, cls).__new__(cls, group_key,
                                                       bases, attrs)

        pool_key = attrs.get('poll_key') or '{}Pool'.format(group_key)

        NewPool = type(pool_key, (Pool,),