工业互联网平台2.0版本后端代码
潘志宝
2024-09-26 1242edffcb0dff177ec37a1a42f753a7920990d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include"cstring"
#include<fstream>
#include<iostream>
#include<string>
#include<stdio.h>
#include <Windows.h>  
#include "Python.h"
 
#include <thread>
 
#ifdef PYGILTHREADLOCK_EXPORTS
#define PYGILTHREADLOCK_API  __declspec(dllexport)
#else
#define PYGILTHREADLOCK_API  __declspec(dllimport)
#endif  
 
 
 
 
/*ȫ�ֽ��ͺ��߳���*/
PYGILTHREADLOCK_API class PyGILThreadLock
{
public:
    PyGILThreadLock();
    ~PyGILThreadLock();
 
private:
    PyGILState_STATE gstate;
    PyThreadState *_save;
    int nStatus;
};