Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 13th, 2002, 03:35 AM
Beteigeuze Beteigeuze is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 0 Beteigeuze User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy concurrent programming - design problem

Hi!

I have a problem in my project I startet a few weeks ago. The requirement is to develop a Task Scheduler who gets a Python script with the tasks spezified. So I have to write some extensions in C++ which provide the functionality. So far so good, now comes the problem. It should be possible to write something like:
Code:
PARBEGIN
    if ....
        exeute some shell scripts on distributed computers
        some method calls from the extension module
    do something else
    while ...
    ...
PAREND


This means that the code bracketed in PARBEGIN PAREND should be executed parallel. The contrary would be SEQBEGIN SEQEND for sequential execution.

The Task Scheduler is for testing some programs, so the scripts should be easy to write and not too complicated. My idea would be to handle this with a call of a function from the extension module which gets a function pointer to a method with the code inside PARBEGIN PAREND as a parameter, so that I can do a callback from the C++ module e.g.:
Code:
def f():
    if ....
        exeute some shell scripts on distributed computers
        some method calls from the extension module, e.g. write in a database
    do something else
    while ...
    ...

exec_par(f())


But how can this be executed concurrent? Is there another possibility in Python?

thx

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > concurrent programming - design problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway