At 11:25 AM -0400 5/4/04, Aaron Sherman wrote:
On Tue, 2004-05-04 at 09:25, Dan Sugalski wrote:
 Okay, I'm working up the design for the event and IO system so we can
 get that underway (who, me, avoid the unpleasantness of strings?
 Nah... :) and I've come across an interesting question.

 The way things are going to work with specific actions a program has
 asked to be done, such as a disk read or write, is that you get back
 a handle PMC that represents the request, and you can wait on that
 handle for the request to be completed. The sequence goes something
 like:

      write Px, Py, Sz     # Return handle, file, and data to write
      waitfor Px           # Wait for the request to finish

So, all Parrot IO will be asynchronous? Does that mean that there's no way to perform an atomic read or write?

Yes, and there isn't now anywhere anyway so it's not a big deal.


Now, if you mean "will there be no way to just say 'get me some data' or 'send this to a stream'" then, yes, we'll do that. The synchronous version will look like:

writew Px, Sy

(with readw, seekw, tellw, and all that, as needed)

Under the hood it'll be async, though.
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to