Nope.
The point is that most Lua functions run in
order - one has to complete before another can begin. There are a few exceptions to the rule, but they're exceptions, and few and far between.
If you call os.loadAPI("suchAndSuch"), then the code in the "suchAndSuch" file is executed, and any global variables it produced are loaded into a _G.suchAndSuch table once it completes.
Until it completes, os.loadAPI() does not return, meaning that any lines of code you write
under that call won't be executed. I recommend reading this
tutorial about APIs, if you haven't already.
You've written an API that performs an infinite loop when executed. As such, os.loadAPI() won't
ever return, and so your script won't continue after calling it.
If you really
need to have an infinite loop performed by your API, then sticking it within a function definition means that loading the API won't run the loop - it'll simply
define the function that runs the loop. You can then use something like the parallel API to run the function containing the loop "alongside" whatever other code you want to run at the same time the loop is being processed.
Again, that's not the only way of handling the whole "multitasking" thing, and it may or may not be the
best way to achieve your desired "end result". The "best way" would depend on what your desired "end result"
is. If you have difficulty explaining it, just comment what you've got and dump it onto
Pastebin, providing links here.