on master help sign in
UnicodeWidthTable.Types: update docs
commit2dbecaa9fe27d8995618f02bf41e046edbf85af9 authorJonathan Daugherty <cygnus@foobox.com> dateThu 5 Mar 2020, 14:21 (7 years ago) parentbeef71e
1 file changed+8−5
src/Graphics/Vty/UnicodeWidthTable/Install.hs+8−5
src/Graphics/Vty/UnicodeWidthTable/Install.hs+8−5
@@ -15,7 +15,9 @@ import Data.Semigroup ((<>))
1515import Graphics.Vty.UnicodeWidthTable.Types
1616
1717-- | Returns True if and only if a custom table has been allocated and
18−-- marked as ready for use. Returns False otherwise.
18+-- marked as ready for use.
19+--
20+-- This function is not thread-safe.
1921isCustomTableReady :: IO Bool
2022isCustomTableReady = (== 1) <$> c_isCustomTableReady
2123
@@ -47,14 +49,15 @@ tableSize = 0x110000
4749-- they don't want to control the terminal with 'mkVty' but do want to
4850-- make calls to 'Graphics.Vty.Image.wcwidth'.
4951--
50−-- It's also important to note that once a
51−-- custom table has been installed, it is permanent for the life of the
52−-- process. No new table can be installed, and the new custom table
53−-- cannot be removed.
52+-- It's also important to note that once a custom table has been
53+-- installed, it is permanent for the life of the process. No new table
54+-- can be installed, and the new custom table cannot be removed.
5455--
5556-- If this function fails for any reason -- if the table cannot be
5657-- installed or is invalid, or if a custom table already exists -- this
5758-- will raise an exception by calling 'error'.
59+--
60+-- This function is not thread-safe.
5861installUnicodeWidthTable :: UnicodeWidthTable -> IO ()
5962installUnicodeWidthTable table = do
6063 initResult <- initCustomTable tableSize