Changeset 6671

Show
Ignore:
Timestamp:
06/20/09 15:51:10 (9 months ago)
Author:
metamorph68
Message:

Task creation and state change should be atomic..

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/bugfix-0.9.1/src/sources/request_source.ml

    r6649 r6671  
    193193      (fun () -> 
    194194         assert (state = `Sleeping) ; 
     195         let t = 
     196           Duppy.Async.add Tutils.scheduler  
     197               ~priority self#feed_queue 
     198         in 
     199         Duppy.Async.wake_up t ; 
     200         task <- Some t ; 
    195201         state <- `Running) () ; 
    196     let t = 
    197       Duppy.Async.add Tutils.scheduler ~priority self#feed_queue 
    198     in 
    199       Duppy.Async.wake_up t ; 
    200       task <- Some t 
    201202 
    202203  method private sleep = 
  • trunk/liquidsoap/src/sources/request_source.ml

    r6629 r6671  
    193193      (fun () -> 
    194194         assert (state = `Sleeping) ; 
     195         let t = 
     196           Duppy.Async.add Tutils.scheduler  
     197               ~priority self#feed_queue 
     198         in 
     199         Duppy.Async.wake_up t ; 
     200         task <- Some t ; 
    195201         state <- `Running) () ; 
    196     let t = 
    197       Duppy.Async.add Tutils.scheduler ~priority self#feed_queue 
    198     in 
    199       Duppy.Async.wake_up t ; 
    200       task <- Some t 
    201202 
    202203  method private sleep =