Git Product home page Git Product logo

floofies / hzkernel Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 35 KB

On hold until further notice. Uses HertzScript coroutines to implement preemptively multitasked JavaScript Green threads.

License: MIT License

JavaScript 100.00%
kernel microkernel cooperative-multitasking javascript asynchronous-tasks multitasking configurable scheduler event-bus async asynchronous system-calls concurrency concurrent-processes preemptive-multitasking concurrent-programming scheduling voluntary-preemptive-scheduling green-threads protothreads

hzkernel's Issues

Curious question

Hi,

This is terrific.

I'm just wondering why you've opted to use generators instead of worker threads and shared memory with the Atomics API (https://hacks.mozilla.org/2016/05/a-taste-of-javascripts-new-parallel-primitives/)

You can do everything with worker threads and shared memory that you're doing with generators but use all CPU cores.

Are you aware of any disadvantages?

EDIT:

The scenario the encloses the question above is having a realtime dashboard based on IMGUI (immediate mode graphics) pattern and using 2D Canvas or WebGL context for drawing. In this scenario, we can have workers sharing a virtual canvas (shared 2D array representing pixels) and each worker is in charge of updating a virtual widget on that canvas. On the main UI thread, we read from that 2D array and draw on canvas.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.