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 阅读全文
posted @ 2011-08-10 21:53 lxgeek 阅读(285) 评论(0) 推荐(0) 编辑
摘要:#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 阅读全文
posted @ 2011-08-10 14:08 lxgeek 阅读(362) 评论(0) 推荐(0) 编辑
摘要: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 ): ""& 阅读全文
posted @ 2011-08-09 21:04 lxgeek 阅读(1290) 评论(0) 推荐(0) 编辑