block
Note: this function is deprecated, please use mask instead.
Applying block to a computation will execute that computation with asynchronous exceptions blocked. That is, any thread which attempts to raise an exception in the current thread with Control.Exception.throwTo will be blocked until asynchronous exceptions are unblocked again. There's no need to worry about re-enabling asynchronous exceptions; that is done automatically on exiting the scope of block.
Threads created by Control.Concurrent.forkIO inherit the blocked state from the parent; that is, to start a thread in blocked mode, use block $ forkIO .... This is particularly useful if you need to establish an exception handler in the forked thread before any asynchronous exceptions are received.
block-buffering should be enabled if possible. The size of the buffer is n items if the argument is Just n and is otherwise implementation-dependent.
returns True if asynchronous exceptions are blocked in the current thread.
The current thread was waiting to retry an atomic memory transaction that could never become possible to complete because there are no other threads referring to any of the TVars involved.
The thread is blocked on an MVar, but there are no other references to the MVar so it can't ever continue.
The thread is waiting to retry an STM transaction, but there are no other references to any TVars involved, so it can't ever continue.
The current thread was executing a call to Control.Concurrent.MVar.takeMVar that could never return, because there are no other references to this MVar.
blocked on a computation in progress by another thread
currently in a foreign call
blocked on some other resource. Without -threaded, I/O and threadDelay show up as BlockedOnOther, with -threaded they show up as BlockedOnMVar.
blocked in retry in an STM transaction
A variable type (BVar), monad (BTM), and arrow (BTA), which provide fast, atomic, composable, blocking inter-thread communication. Blocking transactions are strictly less expressive than software transactional memory, but may be more efficient under very high contention.
Version 0.1.0.5
Block-oriented I/O Driver
Version 0.0-2006-02-03
blockSignals mask calls sigprocmask with SIG_BLOCK to add all interrupts in mask to the set of blocked interrupts.
An Html combinator library
hGetBufNonBlocking hdl buf count reads data from the handle hdl into the buffer buf until either EOF is reached, or count 8-bit bytes have been read, or there is no more data available to read immediately.
hGetBufNonBlocking is identical to hGetBuf, except that it will never block waiting for data to become available, instead it returns only whatever data is available. To wait for data to arrive before calling hGetBufNonBlocking, use hWaitForInput.
If the handle is a pipe or socket, and the writing end is closed, hGetBufNonBlocking will behave as if EOF was reached.
hGetBufNonBlocking ignores the prevailing TextEncoding and NewlineMode on the Handle, and reads bytes directly.
NOTE: on Windows, this function does not work correctly; it behaves identically to hGetBuf.
Note: this function is deprecated, please use mask instead.
To re-enable asynchronous exceptions inside the scope of block, unblock can be used. It scopes in exactly the same way, so on exit from unblock asynchronous exception delivery will be disabled again.
A tetris-like game implemented in Haskell and making use of Gtkh2s (works with GHC 6.8.3 and Gtk2hs 0.9.13)
Version 0.2
A game where blocks of different shapes fall down the screen. If you either fill an entire line or get four of the same color in a row, those disappear. How long can you go before the blocks fill the screen?
Version 0.1.4
hGetNonBlocking is similar to hGet, except that it will never block waiting for data to become available, instead it returns only whatever data is available. If there is no data available to be read, hGetNonBlocking returns empty.
Note: on Windows and with Haskell implementation other than GHC, this function does not work correctly; it behaves identically to hGet.
Show more results