bus: introduce concept of a "default" event loop per-thread and make use of it everywhere

Try to emphasize a bit that there should be a mapping between event
loops and threads, hence introduce a logic that there's one "default"
event loop for each thread, that can be queried via
"sd_event_default()".
This commit is contained in:
Lennart Poettering
2013-11-12 00:12:43 +01:00
parent d5e4ec5b1e
commit afc6adb5ec
11 changed files with 61 additions and 11 deletions
+1 -1
View File
@@ -626,7 +626,7 @@ int main(int argc, char *argv[]) {
if (r <= 0)
goto finish;
r = sd_event_new(&event);
r = sd_event_default(&event);
if (r < 0) {
log_error("Failed to allocate event loop: %s", strerror(-r));
goto finish;