Message from JavaScript discussions

October 2018

— NapaJS added to it will result in a M:N thread model

— 

It is a matter of responsibility... HzScript's only responsibility is to multiplex function execution on a single thread

— The theory of operation is such that it MUST operate on a single thread

— The hertzfeld-kernel module extends HzScript to provide the scheduling facilities neccesary to use the M:N thread model, on multiple threads, utilizing a HzScript dispatcher for every one kernel thread

Message permanent page

— Even then, NapaJS is needed to implement/start the additional kernel threads and share memory

— Hertzfeld-kernel and HertzScript are both 100% javascript and have zero responsibility in hardware or real kernel threads

Message permanent page

— Without NapaJS, the 2 modules are only capable of single threaded Green threading, stuck on N:1 model but simulating a M:N model inside it

Message permanent page

— Exactly

— Ok... better way to explain.... HzScript allows hertzfeld-kernel to multitask, kernel deicdes how to but the ability to context switch is provided by HzScript.... add NapaJS and you get multithreading... but HzScript works in such a way that you can go even further and do multiprocessing as the functions are being multiplexed

Message permanent page

— What is deep dependencies in npm?

— So with HzScript make different tasks at the same time could be possible? Is HzScript works in parallel?

Message permanent page

— By itself no, but it provides the possibility when you add a kernel scheduler and NapaJS