#146 flush() does nothing in windows (despite docs)

v2.6
closed-fixed
None
5
2013-10-17
2013-03-21
Berwyn Hoyt
No

Hello. I observe that flush() does nothing in windows even though the docs say it waits for all characters to be sent. Shouldn't it rather do:
while outWaiting(): pass

Or am I missing something?

Thanks,
Berwyn

Discussion

  • Chris Liechti

    Chris Liechti - 2013-05-31

    yes that would be one way to implement it, though i'd add a time.sleep(0.1) to avoid high CPU load for just waiting.

    a nicer solution would be to use WaitCommEvent with the mask EV_TXEMPTY. though i do not feel like adding so much code (overlapped I/O, sigh) for the flush function that is probably barely used.

    first proposal implemented for release 2.7

     
  • Chris Liechti

    Chris Liechti - 2013-05-31
    • status: open --> pending-fixed
    • assigned_to: Chris Liechti
    • Group: --> v1.0 (example)
     
  • Chris Liechti

    Chris Liechti - 2013-10-17

    2.7 released

     
  • Chris Liechti

    Chris Liechti - 2013-10-17
    • status: pending-fixed --> closed-fixed
    • Group: v1.0 (example) --> v2.6
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks