forked from Dniel97/artemis
Threading support to main twisted reactor
This commit is contained in:
parent
1edec7dba2
commit
737312ca3d
4
index.py
4
index.py
@ -11,7 +11,7 @@ from twisted.web import server, resource
|
||||
from twisted.internet import reactor, endpoints
|
||||
from twisted.web.http import Request
|
||||
from routes import Mapper
|
||||
|
||||
from threading import Thread
|
||||
|
||||
class HttpDispatcher(resource.Resource):
|
||||
def __init__(self, cfg: CoreConfig, config_dir: str):
|
||||
@ -283,4 +283,4 @@ if __name__ == "__main__":
|
||||
server.Site(dispatcher)
|
||||
)
|
||||
|
||||
reactor.run() # type: ignore
|
||||
Thread(target=reactor.run, args=(False,)).start()
|
||||
|
Loading…
Reference in New Issue
Block a user