~ubuntu-branches/ubuntu/trusty/fsharp/trusty

« back to all changes in this revision

Viewing changes to src/fsharp/FSharp.Core/control.fs

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2014-02-13 16:55:16 UTC
  • mfrom: (3.1.2 trusty)
  • Revision ID: package-import@ubuntu.com-20140213165516-o51ftovy7pu2d0rk
Tags: 3.0.34+dfsg-3ubuntu1
* Make DEP-8 test depend on only fsharp package to pick up any dependency breakage
* Add missing libmono-compilerservices-symbolwriter4.0-cil dependency to fsharp
* Add fsharpc/fsharpi manpages
* Strip executable bit from xbuild .Targets files; now lintian clean!

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
                loop firstAction
447
447
            finally
448
448
#if FX_NO_THREAD_STATIC
 
449
                ()
449
450
#else
450
451
                if thisIsTopTrampoline then
451
452
                    Trampoline.thisThreadHasTrampoline <- false
530
531
        member this.Protect firstAction =
531
532
            trampoline <- new Trampoline()
532
533
            trampoline.ExecuteAction(firstAction)
533
 
            FakeUnit
534
534
            
535
535
        member this.Trampoline = trampoline
536
536
        
1338
1338
                if tasks.Length = 0 then args.cont [| |] else  // must not be in a 'protect' if we call cont explicitly; if cont throws, it should unwind the stack, preserving Dev10 behavior
1339
1339
                protectedPrimitiveCore args (fun args ->
1340
1340
                    let ({ aux = aux } as args) = delimitSyncContext args  // manually resync
1341
 
                    let tasks = Seq.toArray l
1342
 
                    if tasks.Length = 0 then args.cont [| |] else
1343
1341
                    let count = ref tasks.Length
1344
1342
                    let firstExn = ref None
1345
1343
                    let results = Array.zeroCreate tasks.Length
1829
1827
                            resultCell.RegisterResult(res,reuseThread=true) |> unfake) 
1830
1828
                    and del = 
1831
1829
#if FX_ATLEAST_PORTABLE
1832
 
                        let invokeMeth = (typeof<Closure<'T>>).GetMethod("Invoke")
 
1830
                        let invokeMeth = (typeof<Closure<'T>>).GetMethod("Invoke", System.Reflection.BindingFlags.NonPublic ||| System.Reflection.BindingFlags.Public ||| System.Reflection.BindingFlags.Instance)
1833
1831
                        System.Delegate.CreateDelegate(typeof<'Delegate>, obj, invokeMeth) :?> 'Delegate
1834
1832
#else                    
1835
1833
                        System.Delegate.CreateDelegate(typeof<'Delegate>, obj, "Invoke") :?> 'Delegate