... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
include $(GOROOT)/src/Make.inc | |
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4 | |
all: | |
$(GC) jsontest.go | |
$(LD) -o jsontest.out jsontest.$O | |
format: | |
$(GOFMT) -w jsontest.go |
package main | |
import ( | |
"log" | |
"io" | |
"os" | |
"crypto/tls" | |
"strings" | |
"net" | |
"flag" |
""" | |
This fabric file makes setting up and deploying a django application much | |
easier to webfaction servers or your dedicated server, but it does make a | |
few assumptions. Namely that you're using Git, Apache and mod_wsgi. Also | |
you should have SSH installed on both the local machine and any servers you | |
want to deploy to. | |
Thanks to: | |
http://github.com/ryanmark/django-project-templates |
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
func main() { |
func worker(die chan bool) { | |
for { | |
select { | |
// ... do stuff cases | |
case <- die: | |
return | |
} | |
} | |
} |
import os | |
import sys | |
import threading | |
import zmq | |
def worker(identity, wurl): | |
ctx = zmq.Context.instance() | |
s = ctx.socket(zmq.REP) | |
s.identity = identity |
" cover.vim - Vim plugin for Go test coverage profiles | |
" install in ftplugin/go | |
" | |
" ":Cover coverprofile" will open the current file in a new read-only window, | |
" highlighting the code regarding to whether it is covered by tests or not. | |
" You can change the colors by highlighting goTestCovered and goTestNotCovered | |
" from your vimrc. | |
if exists("b:did_ftplugin_go_cover") | |
finish |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.