summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/xmlrpcserver.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-30 22:13:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-31 17:05:17 +0000
commit4c57c6eeecc43d0479380144f3073e61a8b43375 (patch)
tree75988728828f7c8528d89815ed1f48353f25d40a /bitbake/lib/bb/server/xmlrpcserver.py
parent3cc9aed5a59d7b72b98ef40727102c98b031f911 (diff)
downloadpoky-4c57c6eeecc43d0479380144f3073e61a8b43375.tar.gz
bitbake: server/process: Run idle commands in a separate idle thread
When bitbake is off running heavier "idle" commands, it doesn't service it's command socket which means stopping/interrupting it is hard. It also means we can't "ping" from the UI to know if it is still alive. For those reasons, split idle command execution into it's own thread. The commands are generally already self containted so this is easier than expected. We do have to be careful to only handle inotify poll() from a single thread at a time. It also means we always have to use a thread lock when sending events since both the idle thread and the command thread may generate log messages (and hence events). The patch depends on previous fixes to the builtins locking in event.py and the heartbeat enable/disable changes as well as other locking additions. We use a condition to signal from the idle thread when other sections of code can continue, thanks to Joshua Watt for the review and tweaks squashed into this patch. We do have some sync points where we need to ensure any currently executing commands have finished before we can start a new async command for example. (Bitbake rev: 67dd9a5e84811df8869a82da6a37a41ee8fe94e2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/xmlrpcserver.py')
-rw-r--r--bitbake/lib/bb/server/xmlrpcserver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/server/xmlrpcserver.py b/bitbake/lib/bb/server/xmlrpcserver.py
index 01f55538ae..2e65dc34a9 100644
--- a/bitbake/lib/bb/server/xmlrpcserver.py
+++ b/bitbake/lib/bb/server/xmlrpcserver.py
@@ -118,7 +118,7 @@ class BitBakeXMLRPCServerCommands():
118 """ 118 """
119 Run a cooker command on the server 119 Run a cooker command on the server
120 """ 120 """
121 return self.server.cooker.command.runCommand(command, self.server.readonly) 121 return self.server.cooker.command.runCommand(command, self.server, self.server.readonly)
122 122
123 def getEventHandle(self): 123 def getEventHandle(self):
124 return self.event_handle 124 return self.event_handle