Changes between Version 18 and Version 19 of IOTasklist
- Timestamp:
- 01/12/11 23:32:15 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IOTasklist
v18 v19 1 1 = IO PMCs = 2 2 3 * Separate pipe-related logic out of FileHandle. Create a Pipe PMC type. 4 * Create a "Select" PMC 5 * Move buffering logic from FileHandle and StringHandle to Handle. Be able to inherit it from all other PMC types. (include buffering-related ATTRs, METHOD_buffer_type, and METHOD_buffer_size) 6 * Move encoding logic (METHOD_encoding, ATTR_encoding, etc) from StringHandle and FileHandle to Handle. Be able to inherit it from all other PMC types. 3 * Separate pipe-related logic out of FileHandle. Create a Pipe PMC type. nwellnhof: I'm not sure a Pipe PMC would be very useful. What we should do is to deprecate opening pipes to external commands via FileHandles which is an ugly Perl5ism, see Ideas. 4 * Create a "Select" PMC, maybe have a look at libevent. 5 * Move buffering logic from FileHandle and StringHandle to Handle. Be able to inherit it from all other PMC types. (include buffering-related ATTRs, METHOD_buffer_type, and METHOD_buffer_size). nwellnhof: We should keep the buffering logic at a C level. All that is needed for now is to pass the buffering functions a pair of read/write callbacks for files and sockets (recv/send). 6 * Move encoding logic (METHOD_encoding, ATTR_encoding, etc) from StringHandle and FileHandle to Handle. Be able to inherit it from all other PMC types. nwellnhof: The encoding logic is encapsulated in the string code quite well now, so I think we should have the StringHandle PMC handle encodings on its own. Only the encoding attribute should be shared. 7 7 * Unify logic wherever possible so multiple IO types can share 8 8 * Use GET_ATTR macros in src/io/filehandle.c so all functions will be able to handle subclasses … … 10 10 = IO API = 11 11 12 * Change IO API to not use PCCINVOKE calls. Method calls on IO PMCs should call the API functions, not the other way around 12 * Change IO API to not use PCCINVOKE calls. Method calls on IO PMCs should call the API functions, not the other way around. 13 13 * Unify the codepaths for Socket and Pipe into the IO API. Refactor the IO API to be more unified. 14 14 * Add externally-visible socket functions to src/io/api.c from src/io/socket_*.c … … 53 53 * Parrot_io_printf should output to Parrot's standard output PMC, not stdout 54 54 * Parrot_io_eprintf should output to Parrot's standard error PMC, not stderr 55 * Create an OSHandle PMC that FileHandle and Socket inherit from, but not StringHandle. 56 * Deprecate the current pipe API and create an OSProcess PMC that works like this (think IPC::Open3) 55 57 56 58 {{{ 59 proc = new 'OSProcess' 60 # flags is something like EXEC_STDIN|EXEC_STDOUT|EXEC_STDERR 61 proc.'exec'(command, args, flags) 62 # get stdin of exec'ed process for writing 63 w_handle = proc.'stdin'() 64 # get stdout of exec'ed process for reading 65 r_handle = proc.'stdout'() 66 }}} 57 67 58 68 ----