Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
jlib
Commits
7abda8b5
Commit
7abda8b5
authored
Dec 17, 2019
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing linux build 11
parent
ac8eff0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
process.h
jlib/base/process.h
+22
-0
test.sln
test/test.sln
+1
-0
test_threadpool.cpp
test/test_threadpool/test_threadpool.cpp
+2
-1
No files found.
jlib/base/process.h
0 → 100644
View file @
7abda8b5
#
pragma
once
#include "config.h"
#include <stdint.h>
namespace
jlib
{
#ifdef JLIB_WINDOWS
#include <Windows.h>
inline
uint64_t
getPid
()
{
return
GetCurrentProcessId
();
}
#else
#include <sys/types.h>
#include <unistd.h>
inline
uint64_t
getPid
()
{
return
::
getpid
();
}
#endif
}
test/test.sln
View file @
7abda8b5
...
...
@@ -32,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "base", "base", "{608A105E-4
..\jlib\base\logging.h = ..\jlib\base\logging.h
..\jlib\base\logstream.h = ..\jlib\base\logstream.h
..\jlib\base\noncopyable.h = ..\jlib\base\noncopyable.h
..\jlib\base\process.h = ..\jlib\base\process.h
..\jlib\base\singleton.h = ..\jlib\base\singleton.h
..\jlib\base\stringpiece.h = ..\jlib\base\stringpiece.h
..\jlib\base\thread.h = ..\jlib\base\thread.h
...
...
test/test_threadpool/test_threadpool.cpp
View file @
7abda8b5
...
...
@@ -3,6 +3,7 @@
#include "../../jlib/base/threadpool.h"
#include "../../jlib/base/countdownlatch.h"
#include "../../jlib/base/currentthread.h"
#include "../../jlib/base/process.h"
using
namespace
jlib
;
using
namespace
std
::
chrono
;
...
...
@@ -45,7 +46,7 @@ void test(int maxSize) {
int
main
()
{
Logger
::
setLogLevel
(
Logger
::
LOGLEVEL_DEBUG
);
LOG_INFO
<<
_getp
id
();
LOG_INFO
<<
getP
id
();
//test(0);
//test(1);
//test(5);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment