diff options
author | Rob Bradford <rob@linux.intel.com> | 2008-10-21 15:33:38 +0100 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2008-10-21 15:51:32 +0100 |
commit | f51afdc7b6b9cbdcdc32f5b9ed3f60a16e77b82f (patch) | |
tree | 217e81ea62069d258de885b45a3c140875c39a1e /bitbake-dev/lib/bb/event.py | |
parent | e1155bcd797b1fde9f6d1ee3cbdae61a022d8382 (diff) | |
download | poky-f51afdc7b6b9cbdcdc32f5b9ed3f60a16e77b82f.tar.gz |
bitbake-dev: Include the worker's PID in events
When the runqueue forks off we save the pid inside the event module for that
thread. When we next fire an event then that PID gets included in the events.
Diffstat (limited to 'bitbake-dev/lib/bb/event.py')
-rw-r--r-- | bitbake-dev/lib/bb/event.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake-dev/lib/bb/event.py b/bitbake-dev/lib/bb/event.py index e5cae275ac..8f0a1961df 100644 --- a/bitbake-dev/lib/bb/event.py +++ b/bitbake-dev/lib/bb/event.py | |||
@@ -25,12 +25,17 @@ BitBake build tools. | |||
25 | import os, re | 25 | import os, re |
26 | import bb.utils | 26 | import bb.utils |
27 | 27 | ||
28 | # This is the pid for which we should generate the event. This is set when | ||
29 | # the runqueue forks off. | ||
30 | worker_pid = 0 | ||
31 | |||
28 | class Event: | 32 | class Event: |
29 | """Base class for events""" | 33 | """Base class for events""" |
30 | type = "Event" | 34 | type = "Event" |
31 | 35 | ||
32 | def __init__(self, d): | 36 | def __init__(self, d): |
33 | self._data = d | 37 | self._data = d |
38 | self.pid = worker_pid | ||
34 | 39 | ||
35 | def getData(self): | 40 | def getData(self): |
36 | return self._data | 41 | return self._data |