472,805 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

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

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 1197

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

Similar topics

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...
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 *** *** ...
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...
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...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.