Re: Multitasking Preview Release

new topic     » goto parent     » topic index » view thread      » older message » newer message

Robert Craig wrote:
> 
> I've posted, as a User Contribution, the 2.5 PD source interpreter 
> modified for multitasking.
> 
> It supports several multitasking API calls.
> It has a scheduler built-in to the interpreter.
> 
> Instead of the traditional single call stack,
> each task has its own call-stack, program counter (i.e. current statement)
> and private variables.
> 
> By executing task_yield() at any place its code, and at any level of
> subroutine call, a task can yield control to the scheduler, and get it
> back later. See readme.txt for more info.
> 
> Included is a modified version of Language War, converted to use the
> new API. I also created a graphical (DOS) demo that shows 4 different
> sorting algorithms running in parallel.
> 
> For the PD and official interpreters, a major change was/is required in
> the way that private data is saved/restored. The Translator should be
> simpler.
> 
> I don't expect most programs will use multitasking, but it's a 
> lot of fun where appropriate.
> 
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a>
> 

Cool Rob, I translated & compiled the source, and everything seems to run well.
According to the documentation, the six tasking routines are implemented
internally. That saves overhead from needing to include files, or time wrapping
machine_func()/machine_proc() operations.

With that said, I must ask why didnt just implement all the Euphoria routines
completely internally from the start? That way there wouldnt be a need for
include files for the Euphoria standard library, or having machine_proc(), or
machine_func() routines. It's seems sort of like a mixed mess now, that could of
been avoided.


Regards,
Vincent

----------------------------------------------
     ___	      __________      ___
    /__/\            /__________\    |\ _\
    \::\'\          //::::::::::\\   |'|::|
     \::\'\        //:::_::::_:::\\  |'|::|
      \::\'\      //::/  |::|  \::\\ |'|::|
       \::\'\    //::/   |::|   \::\\|'|::|
        \::\'\__//::/    |::|    \::\|'|::|
         \::\','/::/     |::|     \::\\|::|
          \::\_/::/      |::|      \::\|::|
           \::,::/       |::|       \:::::|
            \___/        |__|        \____|

 	                 .``.
		         ',,'

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu