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

Run BotScript in separate thread #3

Open
alejandro5042 opened this issue May 22, 2014 · 0 comments
Open

Run BotScript in separate thread #3

alejandro5042 opened this issue May 22, 2014 · 0 comments

Comments

@alejandro5042
Copy link
Owner

Use Start-Job? We should isolate ourselves a bit more from the user's script. In addition, this would allow us to parse commands into a queue so that we don't overrun our input buffer. We can process commands as we have time. (Prioritize network access.)

Then we can look into having multiple instances of BotScript running. This is especially important if a bot gets a lot of requests that are long-running or is active in many channels. We could consider providing a simple synchronization primitive like so:

$Bot.Lock 'name' { script }
$Bot.Lock { script }             # use a default name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant