tinygo
tinygo copied to clipboard
Draft: threads scheduler
- [X] amd64/linux createThread
- [ ] amd64/windows createThread
- [ ] 386/linux createThread
- [ ] arm/linux createThread
- [ ] arm64/linux createThread
- [ ] arm64/linux createThread
- [ ] testdata
- [ ] Leave possible pause to the OS.
https://github.com/tinygo-org/tinygo/pull/2290 must be merged first.
This is a draft of a threads scheduler implementation as a cornerstone of a multi-core implementation.
I can't do it alone. I would love to work together.
See https://github.com/tinygo-org/tinygo/issues/2446
In addition to the scheduler, the sync/*
packages probably needs to be rewritten to account for concurrency.
Yes, Need to test it further, but once #2290 is merged, Mutex, Cond, etc. will likely be thread safe.
Another important piece is the garbage collector. You need to find a way to pause all other threads while the GC is running.