BlockingHuffmanCodecProvider

A blocking Huffman codec provider that blocks the calling thread if a Huffman codec has not yet been supplied. All calling threads will be woken up when the server supplies a huffman codec.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun provide(): HuffmanCodec

Provides the huffman codec instance. If a blocking implementation is used, this will block up the calling threads until it has been supplied with a codec.

Link copied to clipboard
fun supply(codec: HuffmanCodec)

Supplies a Huffman codec instance to this provider, which in return also wakes up any threads waiting on the lock.