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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user