mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
fix I/O thread read, fixed thread ident/pid
This commit is contained in:
parent
45e074ac4a
commit
5230a7ddc3
@ -71,7 +71,7 @@ class MainPrompt(cmd.Cmd, object):
|
|||||||
|
|
||||||
def do_threads(self, line):
|
def do_threads(self, line):
|
||||||
for thread in threading.enumerate():
|
for thread in threading.enumerate():
|
||||||
print(f'Name: {thread.name} PID: {thread.ident}')
|
print(f'Name: {thread.name} IDENT: {thread.ident}')
|
||||||
|
|
||||||
def universal_exit(self):
|
def universal_exit(self):
|
||||||
logger.info("Stopping all server daemons / threads")
|
logger.info("Stopping all server daemons / threads")
|
||||||
|
@ -71,7 +71,7 @@ class ServerOutBuf:
|
|||||||
# TODO: we may want to benchmark reading in blocks and userspace processing it later, reads are kind of expensive as a syscall
|
# TODO: we may want to benchmark reading in blocks and userspace processing it later, reads are kind of expensive as a syscall
|
||||||
self.process_byte(char)
|
self.process_byte(char)
|
||||||
else:
|
else:
|
||||||
flush = self.proc.stdout.read().decode('utf-8')
|
flush = self.proc.stdout.readall().decode('utf-8')
|
||||||
for char in flush:
|
for char in flush:
|
||||||
self.process_byte(char)
|
self.process_byte(char)
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user