summaryrefslogtreecommitdiffstats
path: root/base/simple_thread.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix few trivial Coverity issues, mainly PASS_BY_VALUE.phajdan.jr@chromium.org2009-07-061-1/+1
| | | | | | Review URL: http://codereview.chromium.org/155022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19974 0039d316-1c4b-4281-b951-d872f2087c98
* Use PlatformThreadId, not int when dealing with thread ids.agl@chromium.org2009-01-231-2/+2
| | | | | | | | | | | | | | | | | Windows uses a DWORD (unsigned long) for thread ids and POSIX uses a pid_t (int on Linux) for the same. In the code, we are currently stuffing thread ids into an int which is dangerous on Windows (because DWORDS can exceed an int and wrap) and will break if pid_t is ever != int. This change changes all the places where we currently have an int to use a new typedef, PlatformThreadId. This change also needs to occur for process ids, but I'm not doing that in this CL. Review URL: http://codereview.chromium.org/18677 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8525 0039d316-1c4b-4281-b951-d872f2087c98
* Add a simple thread pool to SimpleThread.deanm@google.com2008-09-021-1/+49
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1634 0039d316-1c4b-4281-b951-d872f2087c98
* Bring back SimpleThread, but with a Delegate interface.deanm@google.com2008-08-291-0/+141
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1519 0039d316-1c4b-4281-b951-d872f2087c98
* Remove CallWrapper and SimpleThread. They overlap too closely with the ↵deanm@google.com2008-08-221-163/+0
| | | | | | message loop variants Thread and Task. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1230 0039d316-1c4b-4281-b951-d872f2087c98
* Properly initialize PlatformThreadHandle. The Open Group Base ↵deanm@google.com2008-08-221-2/+2
| | | | | | Specifications Issue 6 states that pthread_t cannot be assumed to be a numeric type. It should be safe to value initialize it with (), even if it's a structure. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1226 0039d316-1c4b-4281-b951-d872f2087c98
* Make CallWrappers multiuse. No longer make CallWrapper->Run() self ↵deanm@google.com2008-08-221-6/+7
| | | | | | deleting. Since the SimpleThread API backs to joinable threads, the common use case makes it simple for the caller to manage the CallWrapper memory, and this makes everything much clearer. This also allows a CallWrapper's Run() to be called multiple times. This also moves CallWrapper into the base namespace, which I'm told is all the rage these days. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1224 0039d316-1c4b-4281-b951-d872f2087c98
* Create a simple abstraction to a native OS thread, mostly useful for ↵deanm@google.com2008-08-221-0/+162
unittesting when you don't want a message loop. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1217 0039d316-1c4b-4281-b951-d872f2087c98