From 646a5b28fdf9f30598329e3dd087229eea8a2e61 Mon Sep 17 00:00:00 2001 From: Rahix Date: Tue, 16 Apr 2019 21:07:11 +0200 Subject: [PATCH] Update README Signed-off-by: Rahix --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a419721f44e..1aa60759c230 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ bc:register{ ### `BaseControl:finalize([waits], [timeout])` After creating a new base-controller, it will not immediately announce its data -into the network. It will first acuumulate local nouns and verbs and then send +into the network. It will first acumulate local nouns and verbs and then send them out in one batch. This happens when you call `finalize`. Finalize takes two optional parameters: @@ -106,7 +106,7 @@ local bc = require("bc"):finalize({"some_noun"}, 10) ``` ### `BaseControl:set(name, value)` -Set a noun to a new value. This only works if the noun `name` is a local one. +Set a noun or verb to a new value. This only works if `name` is local. You can not set remote nouns. If `name` is a verb, value **must** be a function which will be the new callback. ```lua @@ -257,5 +257,9 @@ of `filter_func` is `function(addr, msg_tbl)`, similar to the callback given to `Network:start`. If `timeout` is not `nil`, `pull` should return after the timeout expired as well. +**Important**: When pulling on an event, the message handler given to `start` +**must** have run before pull returns! Make sure your implementation upholds +this guarantee! + ### `Network:stop()` Close this connection and uninstall the message handler.