Description: 线程池,和socket的绑定及数据处理的 入门结构-thread pool, and the socket and data bundled with the portal structure Platform: |
Size: 8192 |
Author:加文 |
Hits:
Description: 写一个关于线程池,发送接收Socket编程,用户发送一个请求,就从线程池中取出一个线程给用户处理-Write one on the thread pool, sending and receiving Socket programming, the user sends a request to remove a thread from the thread pool handle to the user Platform: |
Size: 24576 |
Author:he_wen |
Hits:
Description: 一个线程池的框架
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. Platform: |
Size: 19456 |
Author:盖义 |
Hits:
Description: 使用python实现socket编程实现一个简单的服务器功能,使用到了多线程和线程池的功能,线程池维护了线程的产生和取消,减少开销,是一个相关简单的python server的开发代码,可以实现后续扩展-Use python achieve socket programming to implement a simple server function, use the function multithreading and thread pool thread pool maintenance thread creation and cancellation, reduce overhead, is a relative simple python server development code can be achieved subsequent expansion Platform: |
Size: 1024 |
Author:黄凯 |
Hits: