@property
    def _api(self):
        if not self._db_api:
            with self._lock:
                if not self._db_api:
                    db_api = api.DBAPI.from_config(
                        conf=self._conf, backend_mapping=self._backend_mapping)
                    if self._conf.database.use_tpool:
                        try:
                            from eventlet import tpool
                        except __HOLE__:
                            LOG.exception(_LE("'eventlet' is required for "
                                              "TpoolDbapiWrapper."))
                            raise
                        self._db_api = tpool.Proxy(db_api)
                    else:
                        self._db_api = db_api
        return self._db_api
dataset/ETHPy150Open openstack/oslo.db/oslo_db/concurrency.py/TpoolDbapiWrapper._api