(*args, **kwargs)
| 209 | |
| 210 | @wraps(func) |
| 211 | def async_wrapper(*args, **kwargs): |
| 212 | from threading import Thread |
| 213 | |
| 214 | def thread_target(): |
| 215 | result = wrapper_requests(*args, **kwargs) |
| 216 | async_result.set_result(result) |
| 217 | |
| 218 | thread = Thread(target=thread_target, daemon=True) |
| 219 | thread.start() |
| 220 | async_result = AsyncResult(thread) |
| 221 | async_wrapper.close = wrapper_requests.close |
| 222 | return async_result |
| 223 | |
| 224 | return async_wrapper |
| 225 |
nothing calls this directly
no test coverage detected