Skip to content

Instantly share code, notes, and snippets.

@FooBarWidget
Created May 15, 2010 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FooBarWidget/402092 to your computer and use it in GitHub Desktop.
Save FooBarWidget/402092 to your computer and use it in GitHub Desktop.
require 'mkmf'
$LIBS << " -pthread"
create_makefile('myext')
#include <pthread.h>
#include <stdlib.h>
static void *dummy(void *arg) {
reurn NULL;
}
void Init_myext() {
pthread_t thr;
pthread_create(&thr, NULL, dummy, NULL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment