cgolock

package module
v0.0.0-...-ae8d4a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2015 License: BSD-3-Clause Imports: 0 Imported by: 10

README

cgolock is a simple piece of code to prevent Go's cgo from spawning hundreds of threads when you really don't want hundreds of threads. It does this across multiple packages, to ensure that using 20 libraries doesn't still give you GOMAXPROCS*20 threads.

Usage

Call cgolock.Lock() just before calling cgo, and cgolock.Unlock() when you're done.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(count int)

func Lock

func Lock()

func Unlock

func Unlock()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL