package stackless

Import Path
	github.com/valyala/fasthttp/stackless (on go.dev)

Dependency Relation
	imports 6 packages, and imported by one package

Involved Source Files Package stackless provides functionality that may save stack space for high number of concurrently running goroutines. func.go writer.go
Package-Level Type Names (total 2)
/* sort by: | */
NewWriterFunc must return new writer that will be wrapped into stackless writer. func NewWriter(dstW io.Writer, newWriter NewWriterFunc) Writer
Writer is an interface stackless writer must conform to. The interface contains common subset for Writers from compress/* packages. ( Writer) Close() error ( Writer) Flush() error ( Writer) Reset(w io.Writer) ( Writer) Write(p []byte) (int, error) *github.com/andybalholm/brotli.Writer *github.com/klauspost/compress/flate.Writer *github.com/klauspost/compress/gzip.Writer *github.com/klauspost/compress/zlib.Writer *compress/flate.Writer *compress/gzip.Writer *compress/zlib.Writer Writer : internal/bisect.Writer Writer : io.Closer Writer : io.WriteCloser Writer : io.Writer func NewWriter(dstW io.Writer, newWriter NewWriterFunc) Writer
Package-Level Functions (total 2)
NewFunc returns stackless wrapper for the function f. Unlike f, the returned stackless wrapper doesn't use stack space on the goroutine that calls it. The wrapper may save a lot of stack space if the following conditions are met: - f doesn't contain blocking calls on network, I/O or channels; - f uses a lot of stack space; - the wrapper is called from high number of concurrent goroutines. The stackless wrapper returns false if the call cannot be processed at the moment due to high load.
NewWriter creates a stackless writer around a writer returned from newWriter. The returned writer writes data to dstW. Writers that use a lot of stack space may be wrapped into stackless writer, thus saving stack space for high number of concurrently running goroutines.