08 2011 档案
摘要:/*ID: lxlenovos1PROG: beadsLANG: C++*/#include <iostream>#include <fstream>#include <string>#include <vector>#include <string.h>#include <stdlib.h>#include <stdio.h>using namespace std;typedef struct ring{ char a; struct ring *flink; struct ring *slink;} rin
阅读全文
摘要:#include <stdio.h>#include <stdlib.h>#include <malloc.h>#include <assert.h>#include <pthread.h>#define FALSE 0pthread_mutex_t thread_mutex = PTHREAD_MUTEX_INITIALIZER;pthread_mutex_t task_mutex = PTHREAD_MUTEX_INITIALIZER;struct temp{ int name;};#define STACK_TYPE struc
阅读全文
摘要:fromhttps://gist.github.com/1130407#!/usr/bin/python# -*- coding: utf-8 -*-"""A simple thread pool.@author: Junaid P V@license: GPLv3""" from threading import Thread, RLock, Lockfrom time import sleepfrom functools import wrapsdef synchronous( tlockname ): ""&
阅读全文