Re: Best practice to run threads from processElement

by Huibert Gill-2 :: Rate this Message:

Reply to Author | View in Thread

Look into to Rife participants and create a simple one.
Use it to create, start and monitor you threads from there.
Should be pretty easy.

Also using the participant, your threads could use callbacks to the participant to report progress.

Your element can then safly read teh reported statuses.


happy hacking!

Huibert Gill

2009/5/29 Matthias Barmeier <matthias.barmeier@...>

Hi out there,

I wonder if there is a best practice available to solve the following
problem:

I want to initiate several background tasks that tars a huge file set
200GB+. This takes a while and I would like to move this processing in a
thread, triggered from a submission handler. The thread/s will run for
several hours and they should report a progress that another Element
should render.

My "naive" approach would be:

Start the thread from the submission handler and write something to
disk/database to store the state. The Element that renders the state of
the threads reads the states from the disk and renders the progress.

Drawbacks: loosing the thread handle, synchronization problems.

Is there something to make it better/more stable/ more rife ?

Ciao
   Matthias





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "rife-users" group.
To post to this group, send email to rife-users@...
To unsubscribe from this group, send email to rife-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---

 
 
 
Google
rifers.org web