+ Example
+
+
+```lua
+local effil = require "effil"
+
+local worker = effil.thread(function()
+ effil.sleep(999) -- worker will hang for 999 seconds
+end)()
+
+worker:cancel(1) -- returns true, cause blocking operation was interrupted and thread was canceled
+```
+
+
+
+
## Function's upvalues
Working with functions Effil serializes and deserializes them using [`lua_dump`](#https://www.lua.org/manual/5.3/manual.html#lua_dump) and [`lua_load`](#https://www.lua.org/manual/5.3/manual.html#lua_load) methods. All function's upvalues are stored following the same [rules](#important-notes) as usual. If function has **upvalue of unsupported type** this function cannot be transmitted to Effil. You will get error in that case.
@@ -528,3 +546,4 @@ effil.type(effil.channel()) == "effil.channel"
effil.type({}) == "table"
effil.type(1) == "number"
```
+
diff --git a/src/cpp/channel.cpp b/src/cpp/channel.cpp
index 9e35960..ce23742 100644
--- a/src/cpp/channel.cpp
+++ b/src/cpp/channel.cpp
@@ -52,14 +52,25 @@ bool Channel::push(const sol::variadic_args& args) {
StoredArray Channel::pop(const sol::optional