Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Is concurrent processing possible in PS?
This thread has 2 replies. Displaying all posts.
Post 1 made on Friday April 3, 2009 at 13:37
Rusty Fobe
Long Time Member
Joined:
Posts:
December 2008
47
I'm calling the same function twice. The second call immediately follows the first. The function contains a recursive scheduleAfter, with different settings. Said otherwise, the two function calls start and end at about the same time. Apparently they interfere, settings of the first call influence the second and vice versa.

This is normal when processing isn't done concurrently. I guess this is the case with ProntoScript. I can rewrite the function using eval to get dynamically set variables. But is there a more elegant way in ProntoScript ?
Post 2 made on Friday April 3, 2009 at 14:01
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
I use asynchronous sockets and when waiting for a call back other processing takes place. That however is a special case of general concurrent processing. Since ScheduleAfter does process based on a call back, concurrent processing in the same sense as TCPIP call backs should be taking place.

However the general case of concurrent processing with several threads running at the same time is a bit more complex requiring many additional language capabilities if it is to be exploited (Fork, Join, Wait until semaphore, etc.). I do not believe that ProntoScript or Javascript allow for explicit concurrent processing. Lyndel?

I suspect that the first call schedules a Schedule after activity, returns, and the second call is immediately executed scheduling the second ScheduleAfter activity. If the same function is being scheduled on the ScheduleAfter call in both cases, then I would look at the function to ascertain what would happen if processing of the first function invokation were interrupted by processing of the second ScheduleAfter invokation. That is are they written to permit such a case?, Does theScheduleAfter timing allow such a case to happen?
OP | Post 3 made on Friday April 3, 2009 at 15:05
Rusty Fobe
Long Time Member
Joined:
Posts:
December 2008
47
Thanks Barry. I put the question in general, as a point of interest. Actually, I encountered the problem with the blink utility I posted in the Utilities folder. I used is a newer version not posted yet, in which I can state if the end result should remain visible or invisible. Here are the two calls:

blink ([channelTag, 1, 1500, true]);// remain invisible for 1500 ms, then remain visible
blink ([channelTag+"IR", 6, 250, false]);// blink 6 times @ 250 ms, then remain invisible

In this setup I fail to see how I can interrupt the processing like you said.


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse