示例#1
0
int main(int argc, char *argv[])
{
    start_python();

    const size_t numThreads = 30;
    boost::thread_group threads;
    for (size_t n=0; n<numThreads; ++n)
    {
        threads.create_thread(Callback);
    }

    printf("Waiting for threads to end...\n");
    threads.join_all();
    printf("Done\n");

    printf("Press any key to end this...\n");
    //getchar();
    end_python();
    return 0;
}
示例#2
0
BOOL handleMessage(UINT msg, WPARAM wParam, LPARAM lParam) {
	switch(msg) {
		case TH_PYTHON_START:
		TINFO("Starte Python Interpreter!");
		start_python();
		break;
		case TH_START:
			TINFO("Nachricht empfangen!");
		break;
		case WM_CLOSE:
			TINFO("Beende Python Interpreter...");
			close_python();
			PostQuitMessage(0);
		break;
		case TH_HANDLE: {
				char** it = getItems(items[4].handle);
				TINFO(it[0]);
		}
		break;
		default:
		return 0;
	}
	return 1;
}