Multithread support in a dynamic language interpreter

2022-10-30 Thread gcao
Re-reading your post and here are some of my answers: I would like to add multithread primitives to allow users to hand some tasks to threads. It should support both IO and Compute tasks. The goal is to better utilize multi-cores. So either spawn or thread creation or both are ok. Parallelizin

Multithread support in a dynamic language interpreter

2022-10-30 Thread gcao
Thanks a lot for the suggestions. What I would like to support is what you'll expect from any language with multithread support * allow user to create threads * avoid deadlock and race conditions - if I have to put some burden on the user, it'll be ok. I'll see what is possible with my c

Multithread support in a dynamic language interpreter

2022-10-30 Thread mratsim
Regarding the primitives you support, it's important to know if you want multithreading for IO, multithreading for compute, or both, hence tell us what the multithreading use-cases are and read this (disclaimer, self-promotion) blog post:

Multithread support in a dynamic language interpreter

2022-10-29 Thread Araq
The important question is "how does threading work in your language?". What are the primitives it supports? How can data be shared between threads? Does it only support message passing? Once you have answered these questions you can think about how your implementation needs to do it. Your imple

Multithread support in a dynamic language interpreter

2022-10-29 Thread gcao
Hi, I would like to add multithreading support in the pet language I'm working on [1]. After reading about Nim's thread model, I'm not sure what is the right way to approach this. In my program, there are a few things that may not be compatible. The VM and values are all ref objects [2]. The V