내 클래스 내에서 스레드를 생성하려고하는데 스레드가 내 클래스의 특정 메서드를 실행합니다. 코드는 다음과 같습니다 컴파일에 class ThreadClass{
int myThread(int arg){
// do something
}
void createThread(){
thread t = thread(myThr
다른 하위 트리 (SubTree 포함 구조체)에 코드를 실행하는 관리자 (클래스 Tree)와 다중 스레드 응용 프로그램 (std :: thread 사용) 병행하여. 기본 개념은 SubTree의 각 인스턴스에는 객체를 저장하는 deque가 있다는 것입니다. 양단 큐가 하늘의 경우, 새로운 요소가 양단 큐에 삽입 될까, 종결 기준에이를 때까지, thread는
가능한 중복은 : Why does this simple std::thread example not work?는 코드 : #include <iostream>
#include <thread>
void f()
{
std::cout << "hi thread" << std::endl;
}
int main()
{
std::thread
는 : 가 왜 : #include <iostream>
#include <thread>
class Foo {
public:
Foo(void) {
std::cout << "Constructor called: " << this << std::endl;
}
~Foo(void) {
std::cout << "De