<[EMAIL PROTECTED]> wrote:
> I fixed the code. This code snippet runs in a seperate thread:
>
>
> PyObject *dict=NULL;
> PyGILState_STATE state = PyGILState_Ensure();
> dict = CreateMyGlobalDictionary();
>
> PyRun_String(, Py_file_input, dict, dict);
>
> ReleaseGlobalDictionary(dict);
>
> But it s
"Benjamin" <[EMAIL PROTECTED]> wrote:
> Two threads should not be running through the Python VM concurrently
> in the same process. The GIL has to be held *any* time you use the
> Python API. When you want to release the GIL (to process something in
> C), use PY_BEGIN_ALLOW_THREADS and
> PY_END_AL
Jean-Paul Calderone wrote:
>
> There's plenty of things other than that one static variable that can get
> messed up in this scenario. The access violation could easily come along
> with random memory corruption. Fixing just the GC to handle this doesn't
> mean your program will be able to keep
Jean-Paul Calderone wrote:
>
> A system exception? What's that? C doesn't have exceptions.
>
How could I determine it? I dont know GCC implementation, and others, but C
on MSVC does have it. My application were not written in C, an exception
raised was something like "access violation at addr
See this piece of code:
/* API to invoke gc.collect() from C */
Py_ssize_t
PyGC_Collect(void)
{
Py_ssize_t n;
if (collecting)
n = 0; /* already collecting, don't do anything */
else {
collecting = 1;
n = collect(NUM_GENERATIONS - 1);
collecting = 0;
}
return n;
}
If a system excepti
Hi,
I'm just curious, if anyone ever implement python based application server
just like CheryPy, Django, TinyERP, or something else, how many requests do
they proceed and what is the longest runing server ever reached before
downtime?
Salam,
-Jaimy.
--
http://mail.python.org/mailman/list
"Paul Boddie" <[EMAIL PROTECTED]> wrote:
> I think the benefits of running Java on CPython are significantly less
> than those had by running Python on the Java VM (or another VM).
> Firstly, who wants to write statically typed code which then runs on a
> virtual machine that can't take advantage
"Paul Boddie" <[EMAIL PROTECTED]> wrote:
>>
>> perhaps in the future another sillly point could be added also, Java has
>> Jython, while Python doesn't have some thing like PyJava or... perhaps
>> Py-va
>> (Python based Java Language).
>
> You could compile Java to CPython bytecode or, in the case
<[EMAIL PROTECTED]> wrote:
>> > fact 1: CPython compiles source code to byte-code.
>> > fact 2: CPython executes this byte-code.
>> > fact 3: Sun's JDK compiles source code to byte-code.
>> > fact 4: Sun's JDK executes this byte-code.
>>
>> Fact 4 is misleading because it is only one option availa
"Ed Jensen" <[EMAIL PROTECTED]> wrote:
>
> Wow, this is pretty misleading.
>
> Java is, indeed, compiled to bytecode; however, modern JVMs typically
> compile the bytecode to native code and then execute the native code.
>
> CPython strictly interprets bytecode; it does not compile the
> bytecode
10 matches
Mail list logo