Using Workers and Scripting

NeuroKernel allows running scripts in a web worker. Web worker code must be either Java or Javascript based. It is basically useful for processing data in the background such as images. Data can be passed to worker and received from easily using a worker adapter as seen in the code below. In this example, the code passes a value to the script and expects it to return the result as well as print them to the console. The postData method is used to post the result back to the worker handler or parent application.