Files: e0c13d7ee916e871ad509db7af306b9afcb16160 / docs / kernel.md
4068 bytesRaw
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Table of Contents
constructor
the Kernel manages the varous message passing functions and provides an interface for the containers to use
Parameters
opts
Object
queue
adds a message to this containers message queue
Parameters
message
run the kernels code with a given enviroment
Parameters
message
object the message to runmethod
(optional, default'onMessage'
)init
boolean whether or not to run the intialization routine
Returns Promise
incrementTicks
updates the number of ticks that the container has run
Parameters
count
Number the number of ticks to add
createMessage
creates a new message
Parameters
opts
data
any
createInstance
creates a new container. Returning a port to it.
Parameters
type
Stringmessage
data
any the data to populate the initail state with
Returns Object
send
sends a message to a given port
Parameters
port
message
Message the messageportRef
Object the port
Built with git-ssb-web