Changes between Version 18 and Version 19 of IOTasklist

Show
Ignore:
Timestamp:
01/12/11 23:32:15 (11 years ago)
Author:
nwellnhof
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IOTasklist

    v18 v19  
    11= IO PMCs = 
    22 
    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. 
    77 * Unify logic wherever possible so multiple IO types can share 
    88 * Use GET_ATTR macros in src/io/filehandle.c so all functions will be able to handle subclasses 
     
    1010= IO API = 
    1111 
    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. 
    1313 * Unify the codepaths for Socket and Pipe into the IO API. Refactor the IO API to be more unified. 
    1414 * Add externally-visible socket functions to src/io/api.c from src/io/socket_*.c 
     
    5353 * Parrot_io_printf should output to Parrot's standard output PMC, not stdout 
    5454 * 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) 
    5557 
    56  
     58{{{ 
     59proc = new 'OSProcess' 
     60# flags is something like EXEC_STDIN|EXEC_STDOUT|EXEC_STDERR 
     61proc.'exec'(command, args, flags) 
     62# get stdin of exec'ed process for writing 
     63w_handle = proc.'stdin'() 
     64# get stdout of exec'ed process for reading 
     65r_handle = proc.'stdout'() 
     66}}} 
    5767 
    5868----