Comments (4)
Speaking of thread safety, you probably know that Python API is not thread safe and you want to call it from multiple threads you have to acquire the Global Interpreter Lock (the infamous GIL).
from embedpy.
Hmm, I think you are right. I recall seeing some crashes when I first wrote the code the way you propose, but now it looks right to me. Maybe it was something else.
Note that if you are not renaming y to x, you should change xG to kG(y) and xj to y->j later in the line.
Nice trick using "" to create a pointer to a null character, BTW.
from embedpy.
What do you think about
x=ja(&y,"");xr?--xn:0;
There is no need to modify xn if x is not shared.
from embedpy.
i'm not sure that the complexity this optimization introduces is worth it. i'd tend toward using k() or doing something threadsafe to copy xC and append "\0" (if "\0" is not already there).
from embedpy.
Related Issues (20)
- Release for support virtual environment HOT 4
- Python 3.9 support HOT 3
- Cannot pass the test.q when installing from Win release HOT 2
- numpy array returns as foreign HOT 5
- Failure to launch on Python 3.10
- TypeError: __init__() missing 2 required positional arguments HOT 2
- \\
- Unable to parse multiline triple-quoted strings HOT 2
- p) isn't showing the results for expressions HOT 1
- tests fail on windows - reopening the closed issue HOT 1
- No conversion for guid from q to Python HOT 4
- windows error Specified Module could not be found HOT 2
- embedPy HOT 11
- tensorflow.t HOT 4
- issue in release 1.3.3 HOT 13
- Virtual environment support
- Missing p.so HOT 2
- embedPy test gives "The specified module could not be found" HOT 2
- Python 3.8 support HOT 1
- Issue when running test.q
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embedpy.