473,505 Members | 16,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Made a huge change to Stackless. Please test!

Hi friends,

for the last two+ weeks, I was hacking on the internals
of stackless, in order to make things cleaner, smaller,
more natural and more complete.

This patch is a quite essential refactoring of the internals,
enhancing functionality at the same time. On the other hand,
semantics are almost not touched.

This finally became a redesign of a lot of the machinery.
Especially, frames no longer have f_tstate, and much
more important, frames no longer carry informationabout the
C state.
C state (as C stacks) is now a property of the tasklets.

All tasklets now have a c state by default.

There are trivial cstates and non-trivial cstates.
They are distinguished by the nesting_level.

A trivial cstate is a C state with nesting_level == 0.
This cstate does not need to be saved, since their context
is well-known. It can be replaced by a number of trivial
statements, which realize so-called soft switches almost
an order of magnitude faster.

Non-trivial cstates are those created by C stack switching.
Note that exactly these tasklets are not restartable after
unpickling!

As a major enhancement, the system now keeps track of all
tasklets which are using a non-trivial cstate, ensuring that
all these tasklets will receive a kill() signal if they
do not finish normally before thread termination.

Here the check-in message:
"""
This was by far the largest check-in since months!
f_state variables are removed from frames.
cstack objects are removed from frames.
All cstate is now kept in the tasklets.
Tasklets with serious cstate are now killed
automatically on thread deallocation.
Tasklet soft-switching is now secured against
repeated entry from "outside": A version variable
is tracked, which makes sure that "main" is always
left with the most recent version of initial_stub.

Hey, this was two weeks of fulltime work!
"""

Please, give this code a heavy load of testing!

With a few changes, this should be the code base
for porting Stackless to Python 2.3.3.

cheers - chris

--
Christian Tismer :^) <mailto:ti****@stackless.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 1224

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

Similar topics

1
2289
by: srijit | last post by:
Hello Chris, Please refer an old message below. I unzipped python23.dll.zip and kept python23.dll in a local folder. I started Python from a dos box (Win XP machine) in the same local folder. I...
0
1323
by: Christian Tismer | last post by:
As already announced, the *********************************************** *** *** *** S t a c k l e s s S p r i n t *** *** ...
13
1491
by: Christian Tismer | last post by:
(re-sent and modified, after I recognized that my hardware-clock is broken, need a new note-buck) Dear community, I would love to publish Stackless 3.1, of course. Also I know that there is...
3
2004
by: Richard Tew | last post by:
Hi, Stackless Python is now available for the recent release of Python 2.4.3 (final). You can either obtain the source code from the SVN repository or download the precompiled windows...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
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
7478
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
5614
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,...
1
5035
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
3188
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
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.