Changeset 11101
- Timestamp:
- 03/13/10 06:39:55 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Task.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Task.pm
r10997 r11101 67 67 since these must not be accessed from worker threads. 68 68 69 However, you should be cautious when keeping references to GUI 70 elements in your tasks, in case the GUI wants to destroy them 71 before your task returns. 72 73 Instead, it is better if your C<finish> method knows how to 74 relocate the GUI element from scratch (and can safely handle 75 the situation when the GUI element is gone, or has changed enough 76 to make the task response irrelevent). 77 69 78 =head1 DESCRIPTION 70 79 71 This is the base class of all background operations in Padre. The SYNOPSIS72 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 worker75 thread for your task, the following steps happen:80 This is the base class of all background operations in Padre. 81 The SYNOPSIS explains the basic usage, but in a nutshell, you create a 82 subclass, implement your own custom C<run> method, create a new instance, 83 and call C<schedule> on it to run it in a worker thread. When the scheduler 84 has a free worker thread for your task, the following steps happen: 76 85 77 86 =over 2 … … 120 129 our $STDERR_EVENT : shared; 121 130 122 # TO DO: Why are the re require?131 # TO DO: Why are these require? 123 132 require Padre; 124 133 require Padre::Wx; … … 142 151 143 152 =cut 144 145 153 146 154 sub new { … … 227 235 228 236 sub prepare { 229 my $self = shift;230 237 return 1; 231 238 } … … 249 256 250 257 sub finish { 251 my $self = shift;252 258 return 1; 253 259 }
Note: See TracChangeset
for help on using the changeset viewer.
