Skip to content

Instantly share code, notes, and snippets.

View kirugan's full-sized avatar
:atom:
Creating awesomeness

Kirill kirugan

:atom:
Creating awesomeness
View GitHub Profile
@kirugan
kirugan / context_test.go
Created February 5, 2019 20:54
Test http.Shutdown and request.Context
package main
import (
"context"
"fmt"
"net/http"
"time"
)
func main() {
@kirugan
kirugan / test.java
Created December 12, 2018 14:33
Test java exception in multithread env
class Test {
public static void main(String args[]) throws InterruptedException {
Thread t = new Thread() {
public void run() {
System.out.println("Welcome new thread");
throw new RuntimeException("Hey there!");
}
};
@kirugan
kirugan / test.go
Created December 12, 2018 14:08
Panic goroutine test
package main
import (
"fmt"
"runtime"
"syscall"
"time"
)
func main() {
@kirugan
kirugan / main.c
Created July 28, 2018 17:44
activation record test
#include <stdio.h>
/**
* channeling "feature" in activation record
*/
void DeclareAndInitArray() {
int array[100];
int j;
int i;
@kirugan
kirugan / simple_increment_failure.go
Last active February 21, 2018 16:37
Example of non atomic ++
package main
import (
"fmt"
"time"
"sync"
)
var glob int64 = 0
var mu sync.Mutex