Paul: You no doubt saw I was working on a serial sketch. The couple times I looked at my case no using send_now I thought I was seeing all my data, but I pulled down your updated usb_serial.c and saw missing data. I went back to TD 1.26 and I see missing data - but less of it. No data is lost when send_now is part of the print process.
I am on Windows 10 - IDE 1.6.6 with TD 1.26 using TYQT as my terminal program.
That sample selectively incorporates send_now in the test cycle and when I run with send_now I see 40,000 lines of data and 2,788,892 bytes of data transferred to TYQT in 11.297 seconds.
With the same parameters if I take out the send_now my external throttling keeps it sending on the same schedule [not entering the printing code] transfer time is 11.470 seconds. Given the same timeframe ideally there should be no lost data? But with new new code several hundred lines [~900] and 64K bytes are never accounted for in TYQT, and the old code lost hundreds fewer lines [~300] and only 14k bytes on the couple runs I cut and pasted.
TYQT was working poorly but was updated in past days and works right with send_now and will properly run over 1000 iterations of my code without fail. Versus as you may have seen IDE SerMon won't complete 3 passes.
If you want to run my code against your analyzer maybe it will help:
View attachment USB_Throttle2.ino
As it is it will make a 40K line run without send_now then toggle to send now operation - [a 10 second wait in between]
If it thinks the output is slowing the system the throttle (usec wait) will be raised and then it will restart. There are Booleans up front to control some behavior as commented.
There are starting throttle values - on my system send_now code needs over 280 to run right without seeing slowdown - I have it init to 300 usecs. The non-send_now running at 300 shows the data loss, but thinks it runs fine as low as 60-90 usecs throttling - with more data loss - but no delay generated by the USB code.
You may not have seen I ran the same test against the LC and the completion times are nearly the same - I'm not sure how closely I viewed the data.
<edit after a few thousand runs and no reboot - my TYQT is being astable.>