Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single-threaded runtime #120

Closed
irh opened this issue Nov 27, 2021 · 0 comments · Fixed by #121
Closed

Single-threaded runtime #120

irh opened this issue Nov 27, 2021 · 0 comments · Fixed by #121

Comments

@irh
Copy link
Contributor

irh commented Nov 27, 2021

Koto currently supports multi-threaded scripting, with containers implemented in terms of Arc<RwLock<…>>.

I added this support for threading mostly as an experiment, and given that Koto is primarily targeted for use as an embedded language for host applications, and single-threaded use cases are clearly the priority, I now find it unsatisfying for the runtime to be dealing with the overhead of having a thread-safe runtime.

I think that switching to a single-threaded runtime now will be a good step forward, and then support for different flavours of parallelism can be enabled via support libraries, with features added into Koto for specific use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant