Replies: 3 comments
|
Under study. Checking out benefits of context in Python. As Python does NOT have this "golang context" feature, 'trying to map out what we need. Please feel free to suggest here or email me about it. Thanks. :) |
|
Plan update: after some research, it seems SOP needs to provide API for context mgmt and thus, allow client code like Python to be able to trigger context cancellation, if/when needed. Example, a Python code running concurrently w/ invoked Transaction Commit in SOP. When the python code senses system triggered abort, it should be able to trigger context cancellation for the ongoing commit. At minimum, this will do. How about when context is aborted from the running SOP function? This will cause the function to return with an error, thus, the Python wrapper should be able to raise an error and allow Python calling code to react from the raised exception. Next: implement this feature/behaviour. |
|
Done. :) See latest code merged to master. |
Uh oh!
There was an error while loading. Please reload this page.
Right now, the CGO/Golang SOP creates a local context (ctx), we want this created in Python side (perhaps call a CGO context.Backgroun() & return handle) then passed in from Python side.
This way, both Python and CGO/Go side are reactive on environmental events/triggers on context.
All reactions