Commit 3e3cbffd authored by eckhart's avatar eckhart
Browse files

- server.py: compatibility with pypy3 (e.g. python 3.6) fixed

parent c5b90ba1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ For JSON see:
    https://json.org/
"""

# TODO: Test with python 3.5

import asyncio
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, CancelledError
@@ -54,6 +55,7 @@ from DHParser.syntaxtree import DHParser_JSONEncoder
from DHParser.toolkit import get_config_value, re
from DHParser.versionnumber import __version__


__all__ = ('RPC_Table',
           'RPC_Type',
           'JSON_Type',
@@ -400,7 +402,7 @@ class Server:
                self.loop.run_forever()
            finally:
                self.server.close()
                self.server.wait_closed()
                asyncio_run(self.server.wait_closed())

    def _empty_message_queue(self):
        while not self.server_messages.empty():