Search Results

Search found 7 results on 1 pages for 'stringer'.

Page 1/1 | 1 

  • Need help regarding Async and fsi

    - by Stringer Bell
    I'd like to write some code that runs a sequence of F# scripts (.fsx). The thing is that I could have literally hundreds of scripts and if I do that: let shellExecute program args = let startInfo = new ProcessStartInfo() do startInfo.FileName <- program do startInfo.Arguments <- args do startInfo.UseShellExecute <- true do startInfo.WindowStyle <- ProcessWindowStyle.Hidden //do printfn "%s" startInfo.Arguments let proc = Process.Start(startInfo) () scripts |> Seq.iter (shellExecute "fsi") it could stress too much my 2GB system. Anyway, I'd like to run scripts by batch of n, which seems also a good exercise for learning Async (I guess it's the way to go). I have written some code and unfortunately it doesn't work: open System.Diagnostics let p = shellExecute "fsi" @"C:\Users\Stringer\foo.fsx" async { let! exit = Async.AwaitEvent p.Exited do printfn "process has exited" } |> Async.StartImmediate foo.fsx is just a hello world script. I'd like also to figure out if it's doable to retrieve a return code for each executing script and if not, find another way. Thanks!

    Read the article

  • Are my actual worker threads exceeding the sp_configure 'max worker threads' value?

    Tom Stringer (@SQLife) was working on some HADR testing for a customer to simulate many availability groups and introduce significant load into the system to measure overhead and such. In his quest to do that he was seeing behavior that he couldn’t really explain and so worked with him to uncover what was happening under the covers. Understand Locking, Blocking & Row VersioningRead Kalen Delaney's eBook to understand SQL Server concurrency, and use SQL Monitor to pinpoint excessive blocking and deadlocking. Download free resources.

    Read the article

  • printf and formatting rules

    - by Stringer Bell
    I'd like to know if all formatting rules of printf functions currently work (or are implemented) in F# ? For instance, if I want to align arguments on 9 characters (padding with spaces or 0), I would use: printfn "%9A %9A" arg1 arg2 //don't seem to work Thanks!

    Read the article

  • Let and construct versus let in sequence

    - by Stringer
    Consider this OCaml code: let coupe_inter i j cases = let lcases = Array.length cases in let low,_,_ = cases.(i) and _,high,_ = cases.(j) in low,high, Array.sub cases i (j-i+1), case_append (Array.sub cases 0 i) (Array.sub cases (j+1) (lcases-(j+1))) Why the expression let ... and ... in is used in place of a let ... in let ... in sequence (like F# force you to do)? This construct seems quite frequent in OCaml code. Thanks!

    Read the article

1