Changeset 854

Show
Ignore:
Timestamp:
06/04/07 01:23:16 (2 years ago)
Author:
lilo_booter
Message:

+ Ensures a stop is honoured immediately

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jahtools/jbatch/jbatch_server.py

    r853 r854  
    113113                                self.playing = False 
    114114                                self.not_empty.acquire( ) 
     115                                self.not_empty.notifyAll( ) 
    115116                        if self.running and len( self.queue ) == 0: 
    116117                                self.not_empty.wait( ) 
     
    133134 
    134135        def stop( self, **args ): 
    135                 self.playing = False 
     136                self.not_empty.acquire( ) 
     137                if self.playing: 
     138                        self.playing = False 
     139                        self.not_empty.notifyAll( ) 
     140                        self.not_empty.wait( ) 
     141                self.not_empty.release( ) 
    136142 
    137143        def pause( self, **args ): 
     
    163169 
    164170        def do( self, **args ): 
    165                 self.stop( ) 
    166                 self.rpn.push( "start", **args ) 
    167                 self.play( ) 
     171                self.stop( **args ) 
     172                self.execute( **args ) 
     173                self.play( **args ) 
    168174 
    169175        def next( self, **args ): 
    170176                if len( self.queue ) > 0: 
    171                         self.stop( ) 
    172                         self.play( ) 
     177                        self.stop( **args ) 
     178                        self.play( **args ) 
    173179 
    174180        def dump( self, input, **args ):