> Write the docs:
>
> > when two threads simultaneously increment the reference count of the same
> > object
>
> Well, the example sucked. Just synchronize ref count manipulation.
> Every OS has locking primitives, and a library exists to deny requests
> to block that lock dead. How integral is
> > > and I want to be able to stop [functions] if they run too long.
>
> > That's tricky [due to a synthetic limitation].
It would suck if you couldn't hold the GIL for as long as you need
to. But how much is it used?
Wrote the docs:
> when two threads simultaneously increment the reference co
2008/3/7, Steven D'Aprano <[EMAIL PROTECTED]>:
> On Fri, 07 Mar 2008 08:12:38 -0800, alex.pedwysocki wrote:
>
> > I have various bits of code I want to interpret and run at runtime in
> > eval ...
>
>
> I hope that code doesn't contain any data coming from an untrusted user.
>
>
>
> > I want to
On Mar 7, 9:43 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Mar 7, 11:12 am, [EMAIL PROTECTED] wrote:
>
> > I have various bits of code I want to interpret and run at runtime in
> > eval ...
>
> Check out these two recipes:
>
> - Using signals:http://aspn.activestate.com/ASPN/Cookbook/Python/R
On Mar 7, 11:12 am, [EMAIL PROTECTED] wrote:
> I have various bits of code I want to interpret and run at runtime in
> eval ...
>
> I want to be able to detect if they fail with error, I want to be able
> to time them, and I want to be able to stop them if they run too
> long. I cannot add code to
On Mar 7, 4:07 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> > I want to be able to detect if [certain threads] fail with error,
>
> You can't? Why ever not?
Try this. ext can be found in 'C Function in a Python Context' on
google groops.
import ext
extA= ext.Ext()
extA[ 'a
On Fri, 07 Mar 2008 08:12:38 -0800, alex.pedwysocki wrote:
> I have various bits of code I want to interpret and run at runtime in
> eval ...
I hope that code doesn't contain any data coming from an untrusted user.
> I want to be able to detect if they fail with error,
That's what try...except
On Mar 7, 10:12 am, [EMAIL PROTECTED] wrote:
> I have various bits of code I want to interpret and run at runtime in
> eval ...
import sys
from time import clock, sleep
from threading import Timer
TimeoutError= type('TimeoutError',(Exception,),{})
class Elapse:
def __init__( self ):
s
On Mar 7, 10:12 am, [EMAIL PROTECTED] wrote:
> I have various bits of code I want to interpret and run at runtime in
> eval ...
>
> I want to be able to detect if they fail with error, I want to be able
> to time them, and I want to be able to stop them if they run too
> long. I cannot add code to
I have various bits of code I want to interpret and run at runtime in
eval ...
I want to be able to detect if they fail with error, I want to be able
to time them, and I want to be able to stop them if they run too
long. I cannot add code to the eval'd strings that will help me
accomplish this.
10 matches
Mail list logo