- 博客(19)
- 资源 (13)
- 收藏
- 关注
翻译 chrome源码之thread
为了学习多线程,现在开始着手研究chorme的线程模型。话了几个小时看了几篇文章,了解了一下chrome线程工作的基本原理。这里贴出几篇有代表性的:1.http://www.chromium.org/developers/design-documents/threading2.http://blog.csdn.net/milado_nju/article/details/8027625
2013-09-27 16:46:34 1337
原创 国庆之后准备研究下chorme base部分的线程
网上就可以看代码,记录下地址:https://code.google.com/p/chromium/codesearch#chromium/src/&q=lang:%5Ec%2B%2B$&sq=package:chromium&type=cs
2013-09-27 13:38:03 1077
翻译 A fast lock-free queue for C++
come from:http://moodycamel.com/blog/2013/a-fast-lock-free-queue-for-c++Sharing data between threads in annoying. Really annoying. If you do it wrong, the data is likely to become corrupted. Even
2013-09-27 11:53:38 3046
原创 unix管道笔记
问几个问题:1.管道(pipe)是干什么的?进程间通信的一种方法2.什么叫管道?貌似跟第一个问题差不多。3.如何生成管道?由一个进程创建(int pipe(int filedes[2])),然后进程调用fork,此后父子进程就可以应用管道传输数据。filedes[0]为读,另一个为写。4.如何使用pipe?取决与我们想要的数据流向。如果对于从parent
2013-09-27 10:07:22 887
翻译 Multithreaded Work Queue in C++
In my previous blog Java Style Thread Class in C++ I discussed how to develop a C++ class that enables you to create Pthread based objects that resemble Java threads. The next step to building a m
2013-09-26 14:27:23 2015
原创 win32下线程封装
首先建立一个MyThread的基类,提供基本的功能:#pragma once#include class MyThread{public: MyThread(); virtual ~MyThread(); bool Start(); bool Join(); bool Detach(); DWORD Self();private: static DWORD W
2013-09-26 14:17:04 1331
翻译 Java Style Thread Class in C++
Java provides the Thread class that enables developers to easily create multiple threads in Java applications. Pthreads is commonly used for multithreaded programming in C and C++, but this API is p
2013-09-26 13:28:14 1144
翻译 dup, dup2
复制一个文件描述符。语法: #include int dup(int oldfd); int dup2(int oldfd, int newfd)描述创建已经存在的文件描述符的拷贝。 After a successful return from dup() or dup2(), the old and new f
2013-09-25 17:26:36 806
翻译 pthread_cond_wait和pthread_cond_timedwait学习
语义 #include int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); Service Program Name: QP0WPTHR Default Public Authority: *USE 线程安全非信号安全
2013-09-23 14:23:55 1227
原创 Lua闭包学习
昨天开始看Lua程序设计,刚才看到第六章的时候,看到闭包的写法很是不解,居然想到在围脖上问人,就问了云风大神,大神给的回复是:第一个返回了一个闭包. function 在 lua 中是 first class 的.之后就自己Google下,原来闭包这个有意思。好吧,把原书上例子贴上来:dolocal oldSin = math.sin local k = math.pi/18
2013-09-18 14:06:01 986
翻译 Synchronous and Asynchronous I/O解释
用两种类型的输入/输入出IO:同步和异步。异步IO也被 成为重叠IO。在同步文件IO中,一个线程启动一个IO操作,立即进行登台状态知道请求结束。异步IO请求通过一个合适的函数调用对内核发起请求。如果这个请求被内核接受,调用线程继续处理其他工作指导内核通知这个线程操作完成了。它然后终端当前的工作,处理来自IO操作的数据。灵芝同步机制可以解释为下图:传统上,IO
2013-09-17 13:41:00 1642
翻译 OVERLAPPED structure学习
Contains information used in asynchronous (or overlapped) input and output (I/O).包含用在异步输入和输入IO的信息。定义:typedef struct _OVERLAPPED { ULONG_PTR Internal; ULONG_PTR InternalHigh; union {
2013-09-17 13:27:44 985
翻译 I/O Completion Ports学习
表示还是自己看MSDN最直接,别人的介绍都是嚼剩下,有木有?IO完成端口为在多处理器系统处理多个异步IO请求提供一个高效的线程模型。当一个进程新建一个完成端口,操作系统新建一个目的为服务这些请求的队列对象。通过利用IO完成端口与相关联的预先分配的线程池而不是新建线程来处理当前请求,处理多个并发的异步IO请求会更快更有效。IO完成端口如何工作函数CreateIoComplet
2013-09-17 12:02:45 1355
翻译 ExitThread function学习
作用:终止调用线程VOID WINAPI ExitThread( _In_ DWORD dwExitCode);参数dwExitCode [in]线程的退出码无返回值注意ExitThread是退出一个线程的C代码。然哦,在C++,线程退出前任何析构函数会被调用,其他的自动清理会被执行。因此,在C++中,你应该从自己的线程函数返
2013-09-17 09:32:04 1501
翻译 TerminateThread函数学习
终结一个线程。BOOL WINAPI TerminateThread( _Inout_ HANDLE hThread, _In_ DWORD dwExitCode);ParametershThread [in, out]要终结线程的句柄。这个句柄必须有THREAD_TERMINATE权利。dwExitCode [in]线程的退出值。
2013-09-17 09:22:22 4555
翻译 win32 select学习
The select function determines the status of one or more sockets, waiting if necessary, to perform synchronous I/O.select函数确定一个或者多个socket的状态,如果必要会等待,表现为同步IO。int select( _In_ int nfds,
2013-09-16 23:05:17 2249
翻译 _beginthread学习
uintptr_t _beginthread( // NATIVE CODE void( __cdecl *start_address )( void * ), unsigned stack_size, void *arglist );uintptr_t _beginthread( // MANAGED CODE void( __clrcall *start_addre
2013-09-16 21:22:18 1176
翻译 CreateProcess 学习
继续看MSDN上关于CreateProcess的解释:Creates a new process and its primary thread. The new process runs in thesecurity context of the calling process.创建一个新的线程和它的初始线程。新的进程运行在调用进程的security context【这个词
2013-09-16 21:09:47 1020
翻译 CreateThread与_beginthread, _beginthreadex创建线程的基本概念和区别(1)
这三个函数都可以创建新的线程,但都是如何创建的呢?当然MSDN文档最权威:Creates a thread to execute within the virtual address space of the calling process.在调用进程的虚拟地址空间里创建一个线程用CreateThread;To create a thread that runs in th
2013-09-16 17:57:36 1648
Oracle8i_9i数据库基础
2011-12-21
FaceTracking
2011-11-20
Efficient region segmentation through ‘creep-and-merge’
2011-03-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人