Skip to content

Commit 3bfed40

Browse files
committed
let TrioExecutor inherit from ThreadPoolExecutor
not doing so is deprecated with Python 3.8
1 parent f7311d9 commit 3bfed40

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

trio_asyncio/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import sniffio
88
import asyncio
99
import warnings
10+
import concurrent.futures
1011
from contextvars import ContextVar
1112

1213
from .adapter import Asyncio_Trio_Wrapper, Trio_Asyncio_Wrapper
@@ -78,7 +79,7 @@ def _select(self, r, w, x, timeout=None): # pragma: no cover
7879
raise NotImplementedError
7980

8081

81-
class TrioExecutor:
82+
class TrioExecutor(concurrent.futures.ThreadPoolExecutor):
8283
"""An executor that runs its job in a Trio worker thread."""
8384

8485
def __init__(self, limiter=None, thread_name_prefix=None, max_workers=None):

0 commit comments

Comments
 (0)