Last change
on this file since 6525 was
6525,
checked in by ronosman, 14 years ago
|
Fix destination_category issue : move the property in the manager to avoid thread data copy.
|
File size:
535 bytes
|
Line | |
---|
1 | package Uploader::TransferManager; |
---|
2 | use threads; |
---|
3 | use threads::shared; |
---|
4 | use Thread::Queue; |
---|
5 | use strict; |
---|
6 | use base qw/Uploader::ThreadManager/; |
---|
7 | use Uploader::TransferWorker; |
---|
8 | use vars qw/$AUTOLOAD/; |
---|
9 | __PACKAGE__->mk_accessors(qw/ |
---|
10 | pwg |
---|
11 | destination_category |
---|
12 | /); |
---|
13 | use Data::Dumper; |
---|
14 | |
---|
15 | sub new_worker { |
---|
16 | my ( $self ) =@_; |
---|
17 | |
---|
18 | |
---|
19 | Uploader::TransferWorker->new({ |
---|
20 | pwg => $self->pwg, |
---|
21 | }); |
---|
22 | |
---|
23 | } |
---|
24 | |
---|
25 | |
---|
26 | sub destination_category_is_empty { |
---|
27 | my ( $self ) = @_; |
---|
28 | |
---|
29 | !scalar @{$self->destination_category}; |
---|
30 | } |
---|
31 | |
---|
32 | 1; |
---|
Note: See
TracBrowser
for help on using the repository browser.