473,465 Members | 1,747 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Last chance! (was: Does anybody really use frame->f_tstate ?)

Dear Python community,

since I didn't get *any* reply to this request,
either the request was bad or there is really
nobody using f_tstate in a way that makes it
urgent to keep.
I will wait a few hours and then make the change
to Stackless, and I'd like to propose to do the
same to the Python core.

Christian Tismer wrote:
Hi colleagues,

this is my second attempt to get rid of the f_tstate field
in frames. I need to find every user of this field.

What am I talking about?
Well, Python always has a thread state variable which
is a unique handle to the current thread. This variable
is accessed in many places, and there exists a fast macro
to get at it.
Every executing Python frame also gets a copy on creation.
In some cases, this frame->f_tstate field is used,
in other cases the current tstate variable is used.

If this sounds foreign to you, please stop reading here.

-------------------------------------------------------------

I would like to get rid of the frame->f_tstate, and I'm trying
to find out if there is a need for it. I don't need it,
for Stackless, it is the opposite, it disturbs.

There was a small thread about this in June this year, where
Guido convinced me that it is possible to create a traceback
on a frame that comes from a different thread.

http://mail.python.org/pipermail/pyt...ne/036254.html

Ok, this is in fact possible, although I don't think
anybody has a need for this.

My question to all extension writers is this:
If you use frame->f_tstate at all, do you use it just
because it is handy, or do you want to use it for
some other purpose?

One purpose could be that you really want to create a traceback
on a different than the current thread. I have never seen this,
but who knows, so that's why I'm asking the Python world.

In most cases, a traceback will be created on a frame
that is currently processd or just has been processed.
Accessing a frame of a different thread that is being processed
might make sense for special debugger cases.

My proposal is
--------------

a) change semantics of PytraceBack_Here to use the current tstate.

b) if such a special purpose exists, create a new function for it.

c) if urgent, different needs exist to keep f_tstate,
then let's forget about this proposal.

Especially for Stackless, I'd be keen of getting rid of this.

thanks for input -- chris

--
Christian Tismer :^) <mailto:ti****@tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 mobile +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
Jul 18 '05 #1
0 1011

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Christian Tismer | last post by:
Hi colleagues, this is my second attempt to get rid of the f_tstate field in frames. I need to find every user of this field. What am I talking about? Well, Python always has a thread state...
2
by: Bill Mill | last post by:
Hey all, There was a lot of talk on this list about recording pycon 2005 talks, but I never saw any messages saying that they'd actually been recorded. The wiki page (...
0
by: cal | last post by:
This is your last chance to participate in VDC's survey on embedded databases. Since you have helped us in the past with our research, I was hoping you could take just 5 minutes out of your busy...
0
by: Marcel - IDUG Europe 2005 | last post by:
Last Chance to Register Online for IDUG 2005 - Europe - Register Today Online registration closes this Friday, 14 October. https://conferences.idug.org/secure/europe/2005/regform.cfm ...
4
by: Bore Biko | last post by:
Dear, Does anybody knows a C commpiler with <curses> support under a DOS...?? Thanks in advance, Robert..!! robert.bralic@si.t-com.hr
4
by: Henry | last post by:
Does anybody have a real-world sample of buiding a treeview control using data from database tables? All the sample code I have found either builds the treeview manually or uses a file directory...
1
by: JSievers | last post by:
Hallo. A good friend of me develops web suites, for example his own at: www.augenpunkte.de. As you can see there my friend is blind and also he uses a Braille-line to develop these projects. For...
5
by: Nathan Sokalski | last post by:
I am looking for a reference that lists the equivelant JavaScript/JScript properties (for example, it took me a while to find that event.x/event.y were the IE equivelant of...
2
by: jermichael_duff | last post by:
Does anybody know how to develop a queue class based on circular chasing pointers with an integer dynamic array and develop a queue class based on an integer linked list. Compare the performance...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.