Skip to content

Commit e248821

Browse files
committed
Use is_main_thread from curtsies.input
1 parent 1e80189 commit e248821

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

bpython/curtsiesfrontend/coderunner.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@
1414
import greenlet
1515
import logging
1616
import signal
17-
import threading
18-
19-
logger = logging.getLogger(__name__)
2017

18+
from curtsies.input import is_main_thread
2119

22-
def is_main_thread():
23-
return threading.main_thread() == threading.current_thread()
20+
logger = logging.getLogger(__name__)
2421

2522

2623
class SigintHappened:

bpython/curtsiesfrontend/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
__version__ as curtsies_version,
2929
)
3030
from curtsies.configfile_keynames import keymap as key_dispatch
31+
from curtsies.input import is_main_thread
3132

3233
from bpython import __version__
3334
from bpython.repl import (
@@ -45,7 +46,6 @@
4546
from .coderunner import (
4647
CodeRunner,
4748
FakeOutput,
48-
is_main_thread,
4949
)
5050
from .filewatch import ModuleChangedEventHandler
5151
from .interaction import StatusBar

0 commit comments

Comments
 (0)