3rd option for file handling
This commit is contained in:
parent
419cad6cab
commit
8228e3cdaf
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ runEditor f = do
|
|||
-> ByteString.Lazy for lazy, fast
|
||||
- Text.IO.hGetContents: strict, needs 2x file size while reading in
|
||||
-> filesize == 2xRAM = bad
|
||||
- Pass the handler around instead of filename, close at exit
|
||||
-> works with all above options (incl. the lazy variants, i think)
|
||||
-> locks the file MultiReader/SingleWriter for free (i think)
|
||||
-}
|
||||
content `seq` hClose handle
|
||||
BrickMain.defaultMain theApp (initialState f content)
|
||||
|
|
Loading…
Reference in a new issue