mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00: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):
|
||||
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):
|
||||
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
|
||||
self.process_byte(char)
|
||||
else:
|
||||
flush = self.proc.stdout.read().decode('utf-8')
|
||||
flush = self.proc.stdout.readall().decode('utf-8')
|
||||
for char in flush:
|
||||
self.process_byte(char)
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user