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.
| [reply] |
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.
| [reply] [d/l] |
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.
| [reply] |