Well, that's not really my problem.  I was under the impression that 
YieldCycles was supposed to keep the link active between the palm device 
and the PC.  Well, any type of data transfer would keep the link open. 
 So, your comment below about "called periodically during the data 
transer" is no issue.. Actually, you shouldn't need YieldCycles here (If 
we understand its purpose).

My problem, (and chankin's ... though I don't want to put words in his 
mouth) comes into play when we have
long periods (over 7 seconds) of NO DATA TRANSFER either TO or FROM the 
palm device.

If you used YieldCycles in a loop reading or writing records to/from the 
device, then I ask, why?  Reading or Writing within 7 seconds keeps the 
connection alive.

I have code like this:

1.  Read all records from the device
2.  for all records sync palm records in memory to PC database on disk
3.  Write all updated records to the device
4.  Update the PC records if modified

Step 2 here takes WAY WAY longer than 7 seconds.  Typically you would 
have a conduit do this:

1.  Read all records from PC
2.  Read all records from Palm
3.  Sync Them
4.  Write all modified records to Palm
5.  Update the PC records.

Even a database of 10K records, step 3 would probably take less than 7 
seconds.
Actually, doing this would probably profile as:  Step 1 3 seconds, step 
2 30 minutes, step 3 5 seconds, step 4 15 minutes, step 5 3 seconds.
(This is if you do everything in memory...i.e..the typical conduit...at 
least from the examples)

But, this is not the "Style" of our conduits...especially when syncing 
to a SQL database.

So, we need something to keep the conduit alive when doing step 2 in the 
first example.

I don't know how you can say it YieldCycles works.  I gave EXPLICIT 
examples of why it doesn't work and imperical evidence.
And your comment implies that you are using YieldCycles within a loop 
reading or writing from the palm...which is no issue.

E.g.

Start Sync

for (i=1; i<60; i++) {
    Thread.sleep(1000);
}

Stop sync.

This fails.  The loop above is to run for 60 seconds.  The palm will 
drop connection after 7 seconds.
Do this

Start Sync

for (i=1; i<60; i++) {
    Thread.sleep(1000);
    YieldCycles(1000);
}

Stop Sync

This fails.  The palm still drops after 7 seconds.  Replace YieldCycles 
above with GetNumberOfRecords (whatever) which will
"ping" the palm will keep the connection alive.

This is the problem.  

And the comments I received from palm about this were something like 
"""We don't support YieldCycles in Hotsync anymore""" or something like 
that...don't remember the exact wording from their reply...I'll look for 
the email one day...but I probably deleted it.

James


Dave Lippincott wrote:

>It works in my conduits.  Maybe you could post your problem with function in
>the conduit forum a 2nd time.
>I'd place it so it gets called periodically during the data transfer.  If
>that requires you to place it in your loop so it gets called for every
>record, so be it.
>
>----- Original Message -----
>From: "James Barwick" <[EMAIL PROTECTED]>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to