Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Is it safe to use gpython interpreter in concurrent processing? #132

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

Closed
fuz-woo opened this issue May 12, 2020 · 4 comments
Closed

Is it safe to use gpython interpreter in concurrent processing? #132

fuz-woo opened this issue May 12, 2020 · 4 comments

Comments

@fuz-woo
Copy link

fuz-woo commented May 12, 2020

I've noted that gpython is not support concurrent processing library yet. Is it safe if I use gpython in multi thread then? If not, how should I make it synchronized.

@ncw
Copy link
Collaborator

ncw commented May 12, 2020

Gpython has no way of making threads (or go routines) yet.

So I guess you are asking about making multiple instances of gpython? I think this should be fine but there may be some global state I'm forgetting about.

In due course I'd like to add a create a go-routine function to gpython. From that point normal go style locking will need to be used to access dictionaries concurrently etc.

@drew-512
Copy link
Contributor

Multi interpreter instances ("contexts") are supported with PR144. This opens the door to many possibilities.

@drew-512
Copy link
Contributor

@sbinet I move to close this as resolved with v0.1.0 (py.Context) now live.

@sbinet
Copy link
Member

sbinet commented Feb 16, 2022

fixed w/ #158

@sbinet sbinet closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants