Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^8: The implementation of SIGHUP in Win32 Perl (non-synchronous IO )

by Anonymous Monk
on Sep 11, 2013 at 22:21 UTC ( [id://1053579]=note: print w/replies, xml ) Need Help??


in reply to Re^7: The implementation of SIGHUP in Win32 Perl
in thread The implementation of SIGHUP in Win32 Perl

I've never seen any evidence of anyone using the native Win32 API (XS) in Perl for non-synchronous IO except me.

Where can I see that?

  • Comment on Re^8: The implementation of SIGHUP in Win32 Perl (non-synchronous IO )

Replies are listed 'Best First'.
Re^9: The implementation of SIGHUP in Win32 Perl (non-synchronous IO )
by BrowserUk (Patriarch) on Sep 11, 2013 at 22:45 UTC

    See Named Pipe Server Using Completion Routines for an example of using asynchrounous IO on Windows.


    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.
      But that is in C, the Anon I assume, and I was referring to XS (or Inline::C) code that would do that. ReadFileEx doesn't exist on CPAN, http://grep.cpan.me/?q=ReadFileEx. I do use ReadFileEx in proprietary XS code. Of course you can argue with Win32::API anything you do in C you can do in Perl, BUT, keeping a char * buffer from an SV allocated during the async operation, while Perl is dealing with other events/things to do, with an event loop, is complicated from pure perl. A pack('P' doesn't guarantee the char * will remain live when the current sub returns, or the next statement boundary.
        But that is in C, the Anon I assume, and I was referring to XS

        Sorry, but I fail to see the distinction between "C" and "XS". They are one and the same.

        Would I even attempt it via Win32::API, and 'pure perl' (that's ironic) -- given the history of failures with Win32::API and callbacks, even before you introduce the idea of those callbacks be invoked by the system at some random point in the future possibly on a completely different thread -- no.

        Before you try and shoot me down in flames; read the entirety (all 26 levels) of Perl crash during perl_clone so that you understand that I understand the requirements and problems of asynchronous, cross-thread callbacks very, very well.


        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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-23 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found