473,398 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Microthreads without Stackless?

Does anyone know of an existing package that provides microthreads, other
than Stackless Python? I would like to be able to provide microthreads in
my Candygram package, but I'm not interested in Stackless (for various
reasons).

In theory, it should be fairly straightforward to do preemptive
microthreading using a combination of generators and a separate IO thread.
The IO thread would poll for pending IO events and also periodically call
thread.interrupt_main() to preempt the current generator.

The devil, however, is in the scheduler's details. I am therefore hoping
that someone else has already gone through those details and created a
package. Anyone heard of such a thing?

Thanks,
- Mike

P.S. The Candygram package is an implementation of Erlang concurrency
primitives within Python. http://candygram.sourceforge.net

Jul 18 '05 #1
1 1923
Take a look at
http://aspn.activestate.com/ASPN/Coo.../Recipe/300019

Michael Hobbs wrote:
Does anyone know of an existing package that provides microthreads, other
than Stackless Python? I would like to be able to provide microthreads in
my Candygram package, but I'm not interested in Stackless (for various
reasons).

In theory, it should be fairly straightforward to do preemptive
microthreading using a combination of generators and a separate IO thread.
The IO thread would poll for pending IO events and also periodically call
thread.interrupt_main() to preempt the current generator.

Jul 18 '05 #2

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

Similar topics

42
by: Bicho Verde | last post by:
I have now free time and money to do what I want :-) I have some basic skills in programming (C, Pascal, Macromedia Actionscript) but don't know exactly what to do in the world of programming. And...
1
by: Lorenzo Gatti | last post by:
Last weekend I tried to install Pygtk2 on Windows. I succeeded (maybe), but I discovered a likely bug. I have Windows 2000, Python 2.3.3 (with ActivePython installed after the normal version) and...
28
by: Matt Leslie | last post by:
Hi, I'm trying to use microthreads under stackless python, since they sound like exactly what I am after, but I am having very little success. I've got a fresh install of python 2.3.3 from...
0
by: Dmitry Borisov | last post by:
> This is true. For performance comparison reasons, and to make > Stackless "complete" in a way, I just developed real thread support > and measured context switch speed. Now it is not longer a...
13
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...
11
by: binarybana | last post by:
After recently getting excited about the possibilities that stackless python has to offer (http://harkal.sylphis3d.com/2005/08/10/multithreaded-game-scripting-with-stackless-python/) and then...
1
by: neokosmos | last post by:
I've seen various generator-based microthread implementations online, but I've been wondering: has anyone used microthreads in this manner in a game environment? Note, I am emphatically *not*...
5
by: Phillip B Oldham | last post by:
Will Python 3 be "stackless"? Or, rather, will it have any features similar to stackless' microthreads and channels?
0
by: davy zhang | last post by:
thank you very much for the advices! I asked myself many times, why not just use thread:D After some research I found thread has some fatal defects 1. thread number is limited by os, that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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
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...

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.