Utils
Rocket.setTimeout — Function
setTimeout(f::Function, timeout::Int)Creates a Task which will asynchornously invoke fucntion f after specified timeout time in milliseconds.
Arguments
f::Function, function to be invoked asynchronouslytimeout::Int, timeout in milliseconds
Examples
using Rocket
using Dates
println("Before: ", Dates.format(now(), "MM:SS"))
setTimeout(1000) do
println("Inside: ", Dates.format(now(), "MM:SS"))
end
println("Right after: ", Dates.format(now(), "MM:SS"))
;
# Logs
# Before: 20:59
# Right after: 20:59
# Inside: 21:00sourceRocket.combined_type — Function
combined_type(sources)Returns a Tuple el-type of observable el-types in sources argument in the same order
Rocket.union_type — Function
Helpers
Rocket.@MStorage — Macro
@MStorage(n::Int)Helper function to generate tuple-like structure MStorageN, but with mutable fields and empty constructor. It is possible then to take a snapshot(::MStorage) which returns a tuple with the same types and values from storage. Some operators and observables use pregenerated MStorage to instatiate uninitialized mutable storage in case when stream is allowed to not emit any values before completion.
Generated structure layout
struct MStorageN{V1, V2, ..., VN}
v1 :: V1
v2 :: V2
...
vn :: VN
endSee also: setstorage!