Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: [Win32] IO::Select's can_read method

by patcat88 (Deacon)
on Dec 09, 2011 at 17:26 UTC ( [id://942702]=note: print w/replies, xml ) Need Help??


in reply to Re^4: [Win32] IO::Select's can_read method
in thread [Win32] IO::Select's can_read method

Cygwin deals with the problem by buffering the data. Attempt to do a non-blocking read, do the async IO for the number of bytes the read wanted, if more than X ms passes without a async response (event obj, APC, or IOCP), declare the read failed with EWOULDBLOCK. Until the read completes, every read will fail with EWOULDBLOCK. Its very simple, simply buffer the data internally.

Select is not that hard to make file aware, you just have to multiplex the async file kernel event objects with the winsock handles. I think winsock handles can goto waitformultiple unmodified unless this is DOS Windows.

Replies are listed 'Best First'.
Re^6: [Win32] IO::Select's can_read method
by syphilis (Archbishop) on Dec 10, 2011 at 06:46 UTC
    Thanks for the explanation/pointers/elaboration, guys.

    No further questions at this stage - though that might change as I delve further into the project.

    (There's currently a PDL-Graphics-Gnuplot implementation which works well on nix type systems (and Cygwin) ... and works to a certain extent on Windows. Gnuplot seems pretty cool, and a fully functional Windows port would be good.)

    Cheers,
    Rob

      There is a MinGW compiled binary of gnuplot here that seems to work after a fashion. I'm actually getting rotating 3D plots displayed now, though they're rather jerky and require the task manager to terminate.

      There are several additional executables delivered -- wgnuplot.exe, pgnuplot.exe, and intriguingly, but unexplained as far as I can see, wgnuplot_pipes.exe -- one or more of which might work better than base gnuplot.exe when piping stuff from perl to plot?

      If only OSS came with better documentation :(


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        There is a MinGW compiled binary of gnuplot here ...

        Yes, that's the one I'm already using. PDL-Graphics-Gnuplot actually works with this version of gnuplot to a promising extent - given that the module is pure perl and makes use of IO::Select and IPC::Run. (I've also been finding that Task Manager often needs to be used to clean up gnuplot.exe ... I'm hoping that's fixable.)

        Cheers,
        Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://942702]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found