- 博客(1)
- 资源 (9)
- 收藏
- 关注
原创 golang的垃圾回收与Finalizer——tcp连接是如何被自动关闭的
最近在做一个golang的连接池。测试过程中发现一个有趣的现象,获取的连接没有归还给连接池,那么过一段时间后该连接会自动关闭掉。猜测这跟连接池应该是没有关系的,于是再用普通的连接做了实验,即dial一个tcp连接,发送请求,然后程序进入sleep,一段时间后该连接还是会自动关闭。对这个过程进行抓包分析,发现主动关闭连接的是client端,即client端主动向服务端发送了FIN包。
2016-07-24 12:11:21 3744
Using the POSIX API - Threads, real-time and IPC
In Linux, when a new process is created, it already contains a thread, used to execute the main() function
Additional threads can be created using the pthread library, which is part of the C library
Of course all threads inside a given process will share the same address space, the same set of open files, etc.
The pthread library also provide thread synchronization primitives: mutexes and conditions
This pthread library has its own header : pthread.h
Applications using pthread function calls should be explicitly linked with the pthread library
gcc o app app.c lpthread
2013-03-24
New features in Linux-2.6
虽然Linux早已到了3.8时代,但是2.6内核非常经典,在嵌入式行业依然被广泛应用。这部slides专为嵌入式开发人员而写。
2013-03-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人