Changeset 11056


Ignore:
Timestamp:
03/10/10 20:19:12 (2 years ago)
Author:
adamk
Message:

Add explicit dependencies for just barely enough of Wx to get the slave driver spawned (enough to make a couple of shared event objects)

File:
1 edited

Legend:

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

    r11039 r11056  
    3434=cut 
    3535 
    36 use 5.008; 
     36use 5.008005; 
    3737use strict; 
    3838use warnings; 
    39  
    40 our $VERSION = '0.58'; 
    41  
    42 # According to Wx docs this MUST be loaded before Wx, 
    43 # so this also happens in the script. 
    4439use threads; 
    4540use threads::shared; 
     41 
     42# This has a version to prevent known cases of people not upgrading 
    4643use Thread::Queue 2.11; 
     44 
     45our $VERSION = '0.58'; 
    4746 
    4847# This event is triggered by the worker thread main loop after 
     
    8180 
    8281        # Wx must be loaded before this code fires 
    83         require Padre::Wx; 
     82        require Wx::Event; 
    8483        $TASK_DONE_EVENT  = Wx::NewEventType() unless defined $TASK_DONE_EVENT; 
    8584        $TASK_START_EVENT = Wx::NewEventType() unless defined $TASK_START_EVENT; 
     
    128127 
    129128    require Storable; 
    130     $self->{cmd_queue}->enqueue( Storable::freeze( [ $task_manager->task_queue ] ) ); 
    131  
    132     return threads->object( $self->{tid_queue}->dequeue ); 
     129    $self->{cmd_queue}->enqueue( 
     130        Storable::freeze( [ $task_manager->task_queue ] ) 
     131    ); 
     132 
     133    return threads->object( 
     134        $self->{tid_queue}->dequeue 
     135    ); 
    133136} 
    134137 
     
    240243    while ( my $args = $inqueue->dequeue ) { # args is frozen [$main, $queue] 
    241244        last if $args eq 'STOP'; 
    242         my $task_queue = Padre::SlaveDriver->new->task_queue; 
     245        my $task_queue    = Padre::SlaveDriver->new->task_queue; 
    243246        my $worker_thread = threads->create( \&_worker_loop, $task_queue ); 
    244247        $outqueue->enqueue( $worker_thread->tid ); 
Note: See TracChangeset for help on using the changeset viewer.