SCOOP, SIMPLE_BACKGROUND_JOB

5 messages Options
Embed this post
Permalink
Gerrit Leder

SCOOP, SIMPLE_BACKGROUND_JOB

Reply Threaded More More options
Print post
Permalink
Hello,

as long as SCOOP is not implemented yet I am working with sequencer.simple_background_job.e
similar to SwingWorker in Java.

I have looked FAQ and tutorials.vision.multi_tasking but I do not get it to work.
Simple thread_test.e is attached.
Output of sample program is:
make
My question is: why is there no worker output performed?


Thanks
Gerrit


thread_test.e (1K) Download Attachment
Cyril ADRIAN

Re: SCOOP, SIMPLE_BACKGROUND_JOB

Reply Threaded More More options
Print post
Permalink
Hello,

On Sun, Feb 8, 2009 at 4:15 PM, Gerrit Leder <[hidden email]> wrote:
as long as SCOOP is not implemented yet I am working with sequencer.simple_background_job.e
similar to SwingWorker in Java.

Not exactly. There are no threads in SmartEiffel, only a sort of collaborative multitasking
 
I have looked FAQ and tutorials.vision.multi_tasking but I do not get it to work.
Simple thread_test.e is attached.
Output of sample program is:
make
My question is: why is there no worker output performed?

Because at least vision.loop_stack.run is missing.

Best regards,
--
Cyril ADRIAN

http://www.cadrian.net/~cyril
Gerrit Leder

Re: SCOOP, SIMPLE_BACKGROUND_JOB

Reply Threaded More More options
Print post
Permalink
OK,

when I do not understand a feature I write a simple application that works. My application does not work. Perhaps it was too simple.

I Added a
top_level_window and
vision.loop_stack.run and
vision.start
to the thread_test. Yes, it is only multitasking, but what i need is a GUI loop and a worker "thread" that has some CPU time...

Please have a look at the attached file.

Best regards
Gerrit

2009/2/8 Cyril ADRIAN <[hidden email]>
Hello,

On Sun, Feb 8, 2009 at 4:15 PM, Gerrit Leder <[hidden email]> wrote:
as long as SCOOP is not implemented yet I am working with sequencer.simple_background_job.e
similar to SwingWorker in Java.

Not exactly. There are no threads in SmartEiffel, only a sort of collaborative multitasking
 
I have looked FAQ and tutorials.vision.multi_tasking but I do not get it to work.
Simple thread_test.e is attached.
Output of sample program is:
make
My question is: why is there no worker output performed?

Because at least vision.loop_stack.run is missing.

Best regards,
--
Cyril ADRIAN

http://www.cadrian.net/~cyril



thread_test.e (1K) Download Attachment
Cyril ADRIAN

Re: SCOOP, SIMPLE_BACKGROUND_JOB

Reply Threaded More More options
Print post
Permalink
On Sun, Feb 8, 2009 at 7:27 PM, Gerrit Leder <[hidden email]> wrote:
when I do not understand a feature I write a simple application that works.

OK, no problem with that. We're here to help.
 
My application does not work. Perhaps it was too simple.

I Added a
top_level_window and
vision.loop_stack.run and
vision.start
to the thread_test. Yes, it is only multitasking, but what i need is a GUI loop and a worker "thread" that has some CPU time...

Please have a look at the attached file.

OK, either you use a loop_stack.run out of a graphic context (although in that case I'd recommend you create your own stack instead of meveraging the whole vision subsystem), OR you start vision using vision.start... but not both ;-)

I fixed your test by simply removing the (now useless) vision.loop_stack.run :-)

And I tested it, it works ;-)

Just call back if you have any further questions (although I'm not really Vision savvy).

Best regards,
--
Cyril ADRIAN

http://www.cadrian.net/~cyril


thread_test.e (1K) Download Attachment
Philippe Ribet

Re: SCOOP, SIMPLE_BACKGROUND_JOB

Reply Threaded More More options
Print post
Permalink
Cyril ADRIAN wrote:

> On Sun, Feb 8, 2009 at 7:27 PM, Gerrit Leder
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     when I do not understand a feature I write a simple application
>     that works.
>
>
> OK, no problem with that. We're here to help.
>  
>
>     My application does not work. Perhaps it was too simple.
>
>     I Added a
>     top_level_window and
>     vision.loop_stack.run and
>     vision.start
>     to the thread_test. Yes, it is only multitasking, but what i need
>     is a GUI loop and a worker "thread" that has some CPU time...
>
>     Please have a look at the attached file.
>
>
> OK, either you use a loop_stack.run out of a graphic context (although
> in that case I'd recommend you create your own stack instead of
> meveraging the whole vision subsystem), OR you start vision using
> vision.start... but not both ;-)
>
Just one word before shuting down the computer for one week...
You can use sequencer without vision, see tutorial/sequencer/example*.e

Best regards,

--

             Philippe Ribet


SmartEiffel:
one methodoology, one language,
highest quality kept secret.
Visit http://smarteiffel.loria.fr