Changeset 11101


Ignore:
Timestamp:
03/13/10 06:39:55 (2 years ago)
Author:
adamk
Message:

Piddling tweaks (mostly docs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Task.pm

    r10997 r11101  
    6767since these must not be accessed from worker threads. 
    6868 
     69However, you should be cautious when keeping references to GUI 
     70elements in your tasks, in case the GUI wants to destroy them 
     71before your task returns. 
     72 
     73Instead, it is better if your C<finish> method knows how to 
     74relocate the GUI element from scratch (and can safely handle 
     75the situation when the GUI element is gone, or has changed enough 
     76to make the task response irrelevent). 
     77 
    6978=head1 DESCRIPTION 
    7079 
    71 This is the base class of all background operations in Padre. The SYNOPSIS 
    72 explains the basic usage, but in a nutshell, you create a subclass, implement 
    73 your own custom C<run> method, create a new instance, and call C<schedule> 
    74 on it to run it in a worker thread. When the scheduler has a free worker 
    75 thread for your task, the following steps happen: 
     80This is the base class of all background operations in Padre. 
     81The SYNOPSIS explains the basic usage, but in a nutshell, you create a 
     82subclass, implement your own custom C<run> method, create a new instance, 
     83and call C<schedule> on it to run it in a worker thread. When the scheduler 
     84has a free worker thread for your task, the following steps happen: 
    7685 
    7786=over 2 
     
    120129our $STDERR_EVENT : shared; 
    121130 
    122 # TO DO: Why are there require? 
     131# TO DO: Why are these require? 
    123132require Padre; 
    124133require Padre::Wx; 
     
    142151 
    143152=cut 
    144  
    145153 
    146154sub new { 
     
    227235 
    228236sub prepare { 
    229     my $self = shift; 
    230237    return 1; 
    231238} 
     
    249256 
    250257sub finish { 
    251     my $self = shift; 
    252258    return 1; 
    253259} 
Note: See TracChangeset for help on using the changeset viewer.