Threading inside an Action

Can we safely thread inside an action provided we handle that correctly?

1 Like

Yes, see existing packs with somewhat similar approach:

https://github.com/search?q=org%3AStackStorm-Exchange+threading&type=Code
https://github.com/search?q=org%3AStackStorm-Exchange+flask&type=Code
https://github.com/search?q=org%3AStackStorm-Exchange+eventlet&type=Code

Also note

https://github.com/search?p=1&q=org%3AStackStorm-Exchange+monkey&type=Code
1 Like

Hmm…all these links not working for me…

@techdiverdown I’m mobile - but was able to get one of them to work by removing the + in the Blank search result bar on github: https://github.com/search?utf8=✓&q=org%3AStackStorm-Exchange+threading&type=Code

1 Like

Just updated the URLs to show as code snippet, looks like forum breaks them.

1 Like

Within the action implementation, can i create threadpool and manage execution lifecycle, is that allowed? I thought action scripts are executed as command line scripts in the subprocess?