Skip to content

Commit

Permalink
Small doc updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeDP committed Mar 10, 2019
1 parent 131e12c commit 22a8371
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/src/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Modules can only see and reach (through PubSub messaging) other modules from sam
Loop
----

Libmodule offers an internal loop, started with modules_ctx_loop(). Each context has its own loop. |br|
Libmodule offers an internal loop, started with modules_ctx_loop(); note that each context has its own loop. |br|
Moreover, you can even easily integrate it into your own loop: modules_ctx_get_fd() will retrieve a pollable fd and POLLIN events will be raised whenever a new message is available. |br|
Remember that right after modules_get_fd(), modules_ctx_dispatch() should be called, to dispatch initial "LoopStarted" messages to each module. |br|
Remember that before starting your loop, modules_ctx_dispatch() should be called, to dispatch initial "LoopStarted" messages to each module. |br|
Then, whenever POLLIN data is available on libmodule's fd, you only need to call modules_ctx_dispatch() again. |br|
Finally, remember to close libmodule's fd retrieved through modules_ctx_get_fd(). |br|

0 comments on commit 22a8371

Please sign in to comment.