diff --git a/docs/event_loop_simple.png b/docs/event_loop_simple.png new file mode 100644 index 0000000000..daf4338a16 Binary files /dev/null and b/docs/event_loop_simple.png differ diff --git a/docs/event_loop_simple.svg b/docs/event_loop_simple.svg new file mode 100644 index 0000000000..be25005002 --- /dev/null +++ b/docs/event_loop_simple.svg @@ -0,0 +1,398 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + quit? + + + quit? + + + + + + + + message := get_next_message() + + + + + message := get_next_message() + + + + + + + + + process_message(message) + + + process_message(message) + + + + + + + + + + + + quit := false + + + + + quit := false + + + + + + + + + + False + + + + + False + + + + + + + + + + + + True + + + + + True + + + + + + + + + exit() + + + exit() + + + + diff --git a/docs/event_loop_worker.png b/docs/event_loop_worker.png new file mode 100644 index 0000000000..1bec1ea598 Binary files /dev/null and b/docs/event_loop_worker.png differ diff --git a/docs/event_loop_worker.svg b/docs/event_loop_worker.svg new file mode 100644 index 0000000000..d824e2d585 --- /dev/null +++ b/docs/event_loop_worker.svg @@ -0,0 +1,708 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + quit? + + + quit? + + + + + + + + message := get_next_message() + + + + + message := get_next_message() + + + + + + + + + + + quit := false + + + + + quit := false + + + + + + + + + + False + + + + + False + + + + + + + + + + + + True + + + + + True + + + + + + + + + exit() + + + exit() + + + + + + + + quit? + + + quit? + + + + + + + + wait_for_message() + + + + + wait_for_message() + + + + + + + + + process_message() + + + process_message() + + + + + + + + + + + + + + + + exit() + + + exit() + + + + + + + + + + + True + + + + + True + + + + + + + + False + + + + + False + + + + + diff --git a/docs/internals/eventloop.html.in b/docs/internals/eventloop.html.in index 3e62d5ca53..aa22ba15cd 100644 --- a/docs/internals/eventloop.html.in +++ b/docs/internals/eventloop.html.in @@ -29,7 +29,7 @@ not waiting for direct user input and have no graphical interface. Such as Libvirt.

- event loop + event loop

In Libvirt this approach is used in combination with poll(2) as all the communication with its @@ -70,7 +70,7 @@ acceptable for Libvirt. Therefore we have came up with the following solution.

- event loop + event loop

The event loop does only necessary minimum and hand over message processing to another thread. In fact, there can be diff --git a/docs/meson.build b/docs/meson.build index 3aabb52950..3e708acf0e 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -10,6 +10,8 @@ docs_assets = [ 'android-chrome-256x256.png', 'apple-touch-icon.png', 'browserconfig.xml', + 'event_loop_simple.png', + 'event_loop_worker.png', 'favicon.ico', 'favicon-16x16.png', 'favicon-32x32.png',