多核编程与并行计算
}
evFinish = CreateEvent (NULL ,FALSE ,FALSE ,NULL) ; _beginthread(ReadThread , 0 , NULL) ; _beginthread(WriteThread , 0 , NULL) ; WaitForSingleObject (evFinish,INFINITE) ; cout<<"The Program is End"<<endl; return 0 ;
实验五
// exa5.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
#include <process.h>
#include <iostream>
#include <fstream>
using namespace std;
int total = 100 ;
HANDLE evFin[2] ;
CRITICAL_SECTION cs ;
void WithdrawThread1(LPVOID param)