-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Add multithreading to FiOne #1545
Conversation
SUPER_SECRET_ADONIS_MULTITHREAD_PREFIX_ |
Needs proof of functionality |
I say we do all compiler/interpreter related stuff on a separate repository which is then included here as a git module. |
just add that into adonis. ez |
WOOHOO! NEW COMMITS! |
@Expertcoderz @Dimenpsyonal @P3tray PoF is here, this can be merged. Script for PoF: local function SUPER_SECRET_ADONIS_MULTITHREAD_PREFIX_hi(arg, arg2, ...)
return arg, arg2, "Hello", ...
end
print(SUPER_SECRET_ADONIS_MULTITHREAD_PREFIX_hi("WAT", false, 5435345, nil, "DOOO", {})) NOTE: A vanilla Lua compiler was used to compile the bytecode and feed it in to FiOne due to a current limitation with function debug names regarding the Yueliang compiler |
Neat. We'd effectively need to pre-encode our Luau and feed it directly into FiOne in order to use mutlithreading, then? That's pretty cool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ery nice.
Add multithreading to FiOne. Officially the first ever per function multithreading implementation in Lua that works out of the box without libraries
Function is multithreaded when function name is prefixed with
SUPER_SECRET_ADONIS_MULTITHREAD_PREFIX_
.Only
(local)? function NAME(...)
is detected, notNAME = function(...)
.Only uses one different thread per function for now. Functions yields until multithreaded function returns or errors
Upval mutation, env mutations, calling closures outside threaded context, cross thread metatables, Instance interactions and cross thread table changes have all undefined behavior
Question: Why does Adonis need this?
Answer: You can't create cloned FiOne runners without hacking Adonis, this makes multithreading possible without hacking Adonis. Making some form of multithreading possible in Adonis without hacking Adonis itself is very nice