cloud-custodian / cloud-custodian/cel-python

Are celpy Environments thread safe?

オープン
#38 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
documentation help wanted question
主要言語
Python
スター
174
フォーク
40
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello!

I was wondering if a celpy Environment instance could be shared amongst threads, or if we should create a new instance when we want to create a runner for a new expression.

I tried to look through the docs and source code but didn't find any reference to this.

One thing I've noticed though is that, when we call the program method, the code is doing an intermediate assignment to an instance variable of the environment, before returning, which I believe can be problematic in terms of thread preemption.
```
self.runnable = runner_class(self, expr, functions)
return self.runnable
```

Nonetheless I might have missed something and would like to get your feedback on this use case.

Thank you very much!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。