"Reentrant" may not be the right term, but I think it is close.
If I share a script with another user and we both execute it at the same time do we over-write each others variables?, or do the two executions happen in entirely distinct memory spaces?
Where can I read about this?
If reentrant is the wrong term, what is the correct one?
Update 14/10/03 o9:45 EDT: I don't think this warrants asking a new question.
I understand from Serge and Henrique that separate executions are "thread-safe" and that operations on shared resources need protection, presumably with Lock Service.
I am trying to decide how to rationalize my current ad hoc "strategy". I have a Web App that uses a spreadsheet for keeping track of a lot of settings, including querying another large spreadsheet for short-listed data. I shared copies with another user, then another. Now I have a mess of spreadsheets and script copies to keep track of. (It grew that way -- don't ask). I don't want to lose the "local cache" spreadsheets but I do want to avoid unnecessarily sharing multiple copies of a thread-safe script.
I'm considering a centralized lookup table that pairs a local cache spreadsheet with a given user, but it is really starting to look like I should rewrite the whole thing with BigQuery or some such, more serious storage. That looks like more effort than its worth though.
Any suggestion would be appreciated.
Update 14/10/03 12:15 EDT:
Originally the WebApp was contained in the spreadsheet, but I moved it out, so they are shared together. To add to the craziness. I now have a script that uses DriveApp to create directories, sharing with a user, copying in the spreadsheet and script and a few other things. In fact for security sake, in addition to the WebAppScript, I have WebAppScriptProxy that publishes the public functions of WebAppScript. That one is what the user interacts with.