You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a lot of boilerplate/defensive programming that's only needed for multithreading and can be disabled at compile time for slightly better performance (and compatibility!) in singlethreaded code, e.g.:
Using Arc<Mutex<Option<T>>> in Bundle (could be Cell<Option<T>> for singlethreaded!)
DashMap in Machine is only necessary if multiple threads are touching it at once
The various IoRunners all use multithreading primitives for synchronizing with their IoSystems
Requiring Send + Sync of Agents, Messages, etc.
All of that can be yeeted! And it should be. Especially leading up to wasm compatibility, which will probably always be easiest to build on no_std.
Figure out a good way to signal single-threadedness
Opt-out feature enabled by any sys/run/plat which expects multithreading?
More general no_std feature/antifeature?
Identify solid replacements for all the uses of multithreading we currently have
Write some form of abstraction layer which easily toggles (would this make a good separate crate?)
Use that abstraction layer everywhere
Some sort of automated check to ensure multithreading things are only used when they should be and vice versa
The text was updated successfully, but these errors were encountered:
There's a lot of boilerplate/defensive programming that's only needed for multithreading and can be disabled at compile time for slightly better performance (and compatibility!) in singlethreaded code, e.g.:
Arc<Mutex<Option<T>>>
inBundle
(could beCell<Option<T>>
for singlethreaded!)DashMap
inMachine
is only necessary if multiple threads are touching it at onceIoRunner
s all use multithreading primitives for synchronizing with theirIoSystem
sSend + Sync
ofAgent
s,Message
s, etc.All of that can be yeeted! And it should be. Especially leading up to wasm compatibility, which will probably always be easiest to build on
no_std
.no_std
feature/antifeature?The text was updated successfully, but these errors were encountered: