Give players and server process titles (in theory)

This commit is contained in:
Matthew Stratford 2020-10-30 23:14:29 +00:00
parent 536bc25b6e
commit 331649e85c
No known key found for this signature in database
GPG key ID: 5F50E4308A3416E8
2 changed files with 9 additions and 1 deletions

View file

@ -237,7 +237,9 @@ class Player():
def __init__(self, channel, in_q, out_q):
setproctitle.setproctitle("BAPSicle - Player " + str(channel))
process_title = "Player: Channel " + str(channel)
setproctitle.setproctitle(process_title)
multiprocessing.current_process().name = process_title
self.running = True
self.out_q = out_q

View file

@ -9,7 +9,13 @@ setproctitle.setproctitle("BAPSicle - Server")
class BAPSicleServer():
def __init__(self):
process_title = "Server"
setproctitle.setproctitle(process_title)
multiprocessing.current_process().name = process_title
startServer()
def __del__(self):