pthread lib에 스레드 풀 구현이 포함되어 있습니까? 또는 사람들이 일반적으로 사용하는 libs가 있습니다/pthread threadpool?
3
A
답변
2
Google을 통해 많은 다른 사람들의 도서관이 있지만 공식 pthread 스레드 풀 라이브러리는 없습니다.
3
스레드 풀은 기본 스레딩 기능을 수행 할 수없는 작업을 디스패치하기 위해 일부 형태의 스레드 간 통신이 필요합니다.
동일한 단일 BSD 소켓 호환 API를 사용하는 ITC, IPC, TCP 및 PGM 소켓과 함께 메시징 기능을 제공하는 것과 같은 것을 고려하십시오 (ØMQ). ØMQ 소켓 유형 중 하나는 스레드 풀 유형 기능을 구현하지만 여러 호스트로 확장 될 수 있으므로 확장 성과 유연성이 크게 향상됩니다.
1
는 pthread_create 함수를 사용하여 만든 thraed POSIX의 곁을 지키는에서
:
int pthread_create(pthread_t *thread_id, const pthread_attr_t * attr, void *(*start_routine)(void*), void *arg);
는 스레드 풀을 구현하기위한, 내가 pthread_create
기능 스레드의 무리를 만들 수 제안합니다, 그리고 스레드가 생성되면 다음 사용 계산 semaphore
. 스레드 할당을 관리합니다.
3
Clarkson 대학의 Jeanna Matthews는 very nice implementation입니다. 왜 보이지 않는거야? 표준 스레드 풀 패턴을 따릅니다.
관련 문제
- 1. ThreadPool 지우기
- 2. PThread 모니터링
- 3. pthread 스케쥴링하기
- 4. pthread multithreading
- 5. .NET ThreadPool 및 구성
- 6. Java threadpool oversubscription
- 7. ThreadPool 또는 Thread 사용
- 8. 어댑터 Threadpool 오류 (Jboss)
- 9. CAsyncSocket 및 ThreadPool 문제
- 10. ThreadPool & Object lifetime
- 11. 부두 구성. ThreadPool
- 12. WPF CanExecute 및 ThreadPool
- 13. Wcf ThreadPool 및 async
- 14. .NET 1.0 ThreadPool 질문
- 15. pthread 스레드 상태
- 16. pthread 컨텍스트 스위칭 모니터링
- 17. C pthread 분할 오류
- 18. pthread 라이브러리 문제 연결
- 19. PThread 대 boost :: thread?
- 20. Pthread 대기열 시스템
- 21. 리눅스에서 pthread 실행
- 22. C++에서 pthread 사용
- 23. Pthread 반환 결과
- 24. pthread 스케줄링 방법은 무엇입니까?
- 25. 컴파일시 -pthread 플래그의 중요성
- 26. 스레드를 Pthread 라이브러리에서 죽이기
- 27. pthread 스레드 풀 시나리오
- 28. C# ThreadPool QueueUserWorkItem 예외 처리
- 29. C# ThreadPool 또는 EndInvoke가없는 BeginInvoke
- 30. Threadpool/WaitHandle 리소스 누출/오류