Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - mylinuxthread
Search - mylinuxthread - List
linux epoll、线程池模型,很好的学习epoll的源代码。-linux epoll, the thread pool model, a good source of learning epoll.
Update : 2025-02-17 Size : 18kb Publisher : yeath

linux epoll多线程编程实例,在Linux下编译通过。-linux epoll instance of multi-threaded programming in Linux, compile.
Update : 2025-02-17 Size : 18kb Publisher : Tony

一个线程池的框架 Lock.cpp :锁的操作 , 读锁可以并发 , 写锁独占. Queue.h : 队列的封装 , 队列的读和写都加了锁的保护. Socket.cpp : 套接口的简单封装. Thread.cpp : 线程的封装实现了些简单的线程停止,运行等功能 , 启动别的线程的时候需要继承次类. Worker.cpp : 用户接口类 , 用户需继承此类。 ListenThread.cpp(继承Thread.cpp) : 服务器监听线程.如果有客户端连接通知ThreadPool类,由ThreadPool类进行任务分派. TaskThread.cpp(继承Thread.cpp) : 具体任务类,负责接受客户端发送数据.-The framework of a thread pool Lock.cpp: the lock operation, read locks can be complicated, write lock exclusive. Queue.h: a cohort of the package, the queue reads and writes are added to lock protection. Socket.cpp: simple package set interface. Thread.cpp: the thread package to achieve some simple thread stop operation, startup time other threads need to inherit such. Worker.cpp: user interface class, the user needs to inherit such. ListenThread.cpp (inherit Thread.cpp): thread server listener. If a client is connected by the notification class ThreadPool, ThreadPool class assignment. TaskThread.cpp (inherit Thread.cpp): responsible for specific tasks, accept the client sent the data.
Update : 2025-02-17 Size : 19kb Publisher : 盖义
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.